No need to clone and replace.

This commit is contained in:
Mayhem 2011-04-28 23:51:26 +02:00
parent e981ff898b
commit cf3a8f73f3
2 changed files with 5 additions and 10 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 clone, favicon, href, l;
var favicon, href, l;
l = unread.replies.length;
if (g.dead) {
if (l > 0) {
@ -1691,10 +1691,8 @@
}
}
favicon = $('link[rel="shortcut icon"]', d.head);
clone = favicon.cloneNode(true);
clone.href = href;
clone.setAttribute('type', 'image/x-icon');
return $.replace(favicon, clone);
favicon.setAttribute('type', 'image/x-icon');
return favicon.href = href;
}
};
redirect = function() {

View File

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