diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-08-30 10:38:18 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-08-30 10:39:42 +0200 |
commit | f49e28e4a6ec515ff4d965cf8ad7821e7258406e (patch) | |
tree | 7c9461b0f96bbc4b891ce9a39cad68a2c517aabb /plugins/newmail_notifier | |
parent | 0c2ffb57a11f4a417ed2d48eea882d92c7ded3ca (diff) |
Fix newmail_notifier issue where favicon wasn't changed back to default (#1489313)
Conflicts:
CHANGELOG
Diffstat (limited to 'plugins/newmail_notifier')
-rw-r--r-- | plugins/newmail_notifier/newmail_notifier.js | 9 |
1 files changed, 6 insertions, 3 deletions
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')) { $('<link rel="shortcut icon" href="'+rcmail.env.favicon_href+'"/>').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 = $('<link rel="shortcut icon" href="plugins/newmail_notifier/favicon.ico"/>'), 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 |