Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/notify.js.coffee')
-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