From 3024346b94d9aeee51fff4af84e8d9ed212431cf Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 8 Dec 2011 02:06:23 +0100 Subject: [PATCH] Fix favicon updating on Opera. See comments, issue #30 --- 4chan_x.user.js | 3 ++- changelog | 2 ++ script.coffee | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index e71978421..e8cd84a83 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2774,8 +2774,9 @@ l = unread.replies.length; favicon = $('link[rel="shortcut icon"]', d.head); favicon.href = g.dead ? l ? this.unreadDead : this.dead : l ? this.unread : this["default"]; - if (engine === "gecko") { + if (engine !== 'webkit') { clone = favicon.cloneNode(true); + favicon.href = null; return $.replace(favicon, clone); } } diff --git a/changelog b/changelog index 797d8ca4d..78618767b 100644 --- a/changelog +++ b/changelog @@ -1,4 +1,6 @@ master +- mayhem + fix favicon updating on Opera 2.23.0 - mayhem diff --git a/script.coffee b/script.coffee index 93e96031d..71fd939ad 100644 --- a/script.coffee +++ b/script.coffee @@ -2171,9 +2171,12 @@ Favicon = else @default - #XXX `favicon.href = href` doesn't work on Firefox - if engine is "gecko" + #`favicon.href = href` doesn't work on Firefox + #`favicon.href = href` isn't enough on Opera + #Opera won't always update the favicon if the href do not change + if engine isnt 'webkit' clone = favicon.cloneNode true + favicon.href = null $.replace favicon, clone redirect = ->