Hides notification after X amount of seconds

This commit is contained in:
Phil Hughes 2016-04-06 15:06:27 +01:00
parent 99fe9c7b77
commit 552cde76fa

View file

@ -2,6 +2,11 @@
notificationGranted = (message, opts, onclick) ->
notification = new Notification(message, opts)
# Hide the notification after X amount of seconds
setTimeout ->
notification.close()
, 8000
if onclick
notification.onclick = onclick