Remove extension.notification

This commit is contained in:
lilia 2017-05-04 11:06:18 -07:00 committed by Scott Nonnenberg
parent bd7f4febaa
commit d85ccbad4f
No known key found for this signature in database
GPG key ID: A4931C09644C654B
2 changed files with 6 additions and 14 deletions

View file

@ -11,18 +11,4 @@
window.addEventListener('beforeunload', callback); 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();
};
}
};
}()); }());

View file

@ -74,6 +74,12 @@
message : message, message : message,
iconUrl : iconUrl iconUrl : iconUrl
}); });
var notification = new Notification(title, {
body : message,
icon : iconUrl,
tag : 'signal'
});
notification.onclick = this.onclick.bind(this);
}, },
getSetting: function() { getSetting: function() {
return storage.get('notification-setting') || 'message'; return storage.get('notification-setting') || 'message';