mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
feature(dom) Notify click: add focus
This commit is contained in:
parent
18671806ad
commit
ad4e3cc645
1 changed files with 7 additions and 2 deletions
|
|
@ -655,12 +655,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
}, window);
|
||||
|
||||
this.send = function(msg) {
|
||||
var notify, granted = Notify.check();
|
||||
var notify,
|
||||
focus = window.focus.bind(window),
|
||||
granted = Notify.check();
|
||||
|
||||
if (granted && Show)
|
||||
if (granted && Show) {
|
||||
notify = new Notification(msg, {
|
||||
icon: '/img/favicon/favicon-notify.png',
|
||||
});
|
||||
|
||||
Events.addClick(focus, notify);
|
||||
}
|
||||
};
|
||||
|
||||
this.check = function () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue