From deae7ac78f9411adc0736403f11607b66a68b45b Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 7 Jul 2016 10:45:09 +0200 Subject: [PATCH] don't hide the notification until it has been seen --- www/common/notify.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/www/common/notify.js b/www/common/notify.js index 1bc87e17e..c164040c0 100644 --- a/www/common/notify.js +++ b/www/common/notify.js @@ -51,13 +51,13 @@ var alt = favicon.getAttribute('data-alt-favicon'); } - var cancel = function () { + var cancel = function (pending) { // only run one tab notification at a time if (Module[key]) { window.clearInterval(Module[key]); document.title = original; if (favicon) { - favicon.setAttribute('href', main); + favicon.setAttribute('href', pending? alt : main); } return true; @@ -78,13 +78,15 @@ Module[key] = window.setInterval(function () { if (count > 0) { return step(); } - cancel(); + cancel(true); + }, frequency); step(); return { cancel: cancel, original: original + }; };