Hides notification after X amount of seconds
This commit is contained in:
parent
99fe9c7b77
commit
552cde76fa
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue