diff --git a/lib/client/dom.js b/lib/client/dom.js index c08159f2..70258d43 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -643,7 +643,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; }; }, NotifyProto = function() { - var Show, Notify = this; + var Show, Allow, Notify = this; Events.add({ 'blur' :function() { @@ -655,17 +655,20 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; }, window); this.send = function(msg) { - var notify, - focus = window.focus.bind(window), - granted = Notify.check(); - - if (granted && Show) { - notify = new Notification(msg, { - icon: '/img/favicon/favicon-notify.png', - }); - - Events.addClick(focus, notify); - } + CloudCmd.getConfig(function(config) { + var notify, + notifications = config.notifications, + focus = window.focus.bind(window), + granted = Notify.check(); + + if (notifications && granted && Show) { + notify = new Notification(msg, { + icon: '/img/favicon/favicon-notify.png', + }); + + Events.addClick(focus, notify); + } + }) }; this.check = function () {