diff options
| author | 2014-09-18 10:46:34 +0200 | |
|---|---|---|
| committer | 2014-09-18 10:46:34 +0200 | |
| commit | 4211539c24e36531f2c5440ad454c4e208131047 (patch) | |
| tree | 97faa08fdb8fc48da1516070c1ee50fe211846db /p/scripts | |
| parent | 1967e289cfd09cdeb0d6beb5a10a3dacbc16a737 (diff) | |
Add timeout option for HTML5 notification
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index fd49d62ba..c568bac35 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -866,6 +866,12 @@ function notifs_html5_show(nb) { notification.onclick = function() { window.location.reload(); } + + if (html5_notif_timeout !== 0){ + setTimeout(function() { + notification.close(); + }, html5_notif_timeout * 1000); + } } function init_notifs_html5() { |
