summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-06 15:06:27 +0100
committerPhil Hughes <me@iamphill.com>2016-04-11 17:20:47 +0100
commit552cde76fa96282dec4ba002cd1850d003a5b29f (patch)
treee296b4356ab0ab157930dce56ba5387a32ec5fb4
parent99fe9c7b7703b1594c9cda571f43f20198f96b0f (diff)
downloadgitlab-ce-552cde76fa96282dec4ba002cd1850d003a5b29f.tar.gz
Hides notification after X amount of seconds
-rw-r--r--app/assets/javascripts/lib/notify.js.coffee5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/notify.js.coffee b/app/assets/javascripts/lib/notify.js.coffee
index 3f9ca39912c..9e28353ac34 100644
--- a/app/assets/javascripts/lib/notify.js.coffee
+++ b/app/assets/javascripts/lib/notify.js.coffee
@@ -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