Hides notification after X amount of seconds
This commit is contained in:
parent
99fe9c7b77
commit
552cde76fa
|
@ -2,6 +2,11 @@
|
||||||
notificationGranted = (message, opts, onclick) ->
|
notificationGranted = (message, opts, onclick) ->
|
||||||
notification = new Notification(message, opts)
|
notification = new Notification(message, opts)
|
||||||
|
|
||||||
|
# Hide the notification after X amount of seconds
|
||||||
|
setTimeout ->
|
||||||
|
notification.close()
|
||||||
|
, 8000
|
||||||
|
|
||||||
if onclick
|
if onclick
|
||||||
notification.onclick = onclick
|
notification.onclick = onclick
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue