From 6e1cdb370b43ac4bf6747e7201d7bf35f923fbaf Mon Sep 17 00:00:00 2001 From: William Boman Date: Wed, 16 Nov 2016 17:42:06 +0100 Subject: [PATCH] client: don't dismiss native web notifications programmatically after 5s --- client/js/lounge.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/js/lounge.js b/client/js/lounge.js index 1eab796b..f491462c 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -1041,14 +1041,11 @@ $(function() { icon: "img/logo-64.png", tag: target }); - notify.onclick = function() { + notify.addEventListener("click", function() { window.focus(); button.click(); this.close(); - }; - window.setTimeout(function() { - notify.close(); - }, 5 * 1000); + }); } catch (exception) { // `new Notification(...)` is not supported and should be silenced. }