Hides notification after X amount of seconds

This commit is contained in:
Phil Hughes
2016-04-11 17:20:47 +01:00
parent 99fe9c7b77
commit 552cde76fa
@@ -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