add 'autoclose' to notifications (i.e. close after 3 seconds)

This commit is contained in:
Alexander Leibzon 2015-01-25 17:14:06 +02:00
parent 4a8a4482fc
commit 091e3d41e1

View File

@ -32,6 +32,9 @@
//using the 'tag' to avoid showing duplicate notifications
var notification = new Notification(title, {'tag': title+content, 'body': content});
setTimeout(function(){
notification.close();
},3000);
notification.onclick = function () {
window.focus();
this.cancel();