From f49e28e4a6ec515ff4d965cf8ad7821e7258406e Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 30 Aug 2013 10:38:18 +0200 Subject: Fix newmail_notifier issue where favicon wasn't changed back to default (#1489313) Conflicts: CHANGELOG --- plugins/newmail_notifier/newmail_notifier.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js index c398424b6..b00f33d10 100644 --- a/plugins/newmail_notifier/newmail_notifier.js +++ b/plugins/newmail_notifier/newmail_notifier.js @@ -30,9 +30,9 @@ function newmail_notifier_run(prop) function newmail_notifier_stop(prop) { // revert original favicon - if (rcmail.env.favicon_href && (!prop || prop.action != 'check-recent')) { + if (rcmail.env.favicon_href && rcmail.env.favicon_changed && (!prop || prop.action != 'check-recent')) { $('').replaceAll('link[rel="shortcut icon"]'); - rcmail.env.favicon_href = null; + rcmail.env.favicon_changed = 0; } // Remove IE icon overlay if we're pinned to Taskbar @@ -54,7 +54,10 @@ function newmail_notifier_basic() var link = $(''), oldlink = $('link[rel="shortcut icon"]', w.document); - rcmail.env.favicon_href = oldlink.attr('href'); + if (!rcmail.env.favicon_href) + rcmail.env.favicon_href = oldlink.attr('href'); + + rcmail.env.favicon_changed = 1; link.replaceAll(oldlink); // Add IE icon overlay if we're pinned to Taskbar -- cgit v1.2.3