Cloning and replacing is needed [spoiler]for Firefox[/spoiler]

This commit is contained in:
Mayhem 2011-04-29 00:51:08 +02:00
parent ea73a1a417
commit c22b982378
2 changed files with 10 additions and 5 deletions

View File

@ -1675,7 +1675,7 @@
haloSFW: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAZklEQVR4XrWRQQoAIQwD+6L97j7Ih9WTQQxhDqJQCk4Mranuvqod6LgwawSqSuUmWSPw/UNlJlnDAmA2ARjABLYj8ZyCzJHHqOg+GdAKZmKPIQUzuYrxicHqEgHzP9g7M0+hj45sAnRWxtPj3zSPAAAAAElFTkSuQmCC',
haloNSFW: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAABmzDP///8AAABet0i+AAAAAXRSTlMAQObYZgAAAExJREFUeF4tyrENgDAMAMFXKuQswQLBG3mOlBnFS1gwDfIYLpEivvjq2MlqjmYvYg5jWEzCwtDSQlwcXKCVLrpFbvLvvSf9uZJ2HusDtJAY7Tkn1oYAAAAASUVORK5CYII=',
update: function() {
var favicon, href, l;
var clone, favicon, href, l;
l = unread.replies.length;
if (g.dead) {
if (l > 0) {
@ -1691,8 +1691,10 @@
}
}
favicon = $('link[rel="shortcut icon"]', d.head);
favicon.setAttribute('type', 'image/x-icon');
return favicon.href = href;
clone = favicon.cloneNode(true);
clone.href = href;
clone.setAttribute('type', 'image/x-icon');
return $.replace(favicon, clone);
}
};
redirect = function() {

View File

@ -1319,9 +1319,12 @@ Favicon =
else
href = Favicon.default
#XXX `favicon.href = href` doesn't work on Firefox
favicon = $ 'link[rel="shortcut icon"]', d.head
favicon.setAttribute 'type', 'image/x-icon'
favicon.href = href
clone = favicon.cloneNode true
clone.href = href
clone.setAttribute 'type', 'image/x-icon'
$.replace favicon, clone
redirect = ->