diff --git a/js/chromium.js b/js/chromium.js index 4826917b797a..f26bd9826c62 100644 --- a/js/chromium.js +++ b/js/chromium.js @@ -11,18 +11,4 @@ window.addEventListener('beforeunload', callback); } }; - - extension.notification = { - update: function(options) { - var notification = new Notification(options.title, { - body : options.message, - icon : options.iconUrl, - tag : 'signal' - }); - notification.onclick = function() { - Whisper.Notifications.onclick(); - }; - } - }; - }()); diff --git a/js/notifications.js b/js/notifications.js index 0ea28b8b4530..29f5c1b97861 100644 --- a/js/notifications.js +++ b/js/notifications.js @@ -74,6 +74,12 @@ message : message, iconUrl : iconUrl }); + var notification = new Notification(title, { + body : message, + icon : iconUrl, + tag : 'signal' + }); + notification.onclick = this.onclick.bind(this); }, getSetting: function() { return storage.get('notification-setting') || 'message';