Merged pull request #41 from MayhemYDG/master.
Fix custom favicons on Chrome, update favicon on 404
This commit is contained in:
commit
9b8af0c1b0
@ -1341,6 +1341,7 @@
|
||||
input.value = 404;
|
||||
}
|
||||
d.title = d.title.match(/.+- /)[0] + 404;
|
||||
g.dead = true;
|
||||
Favicon.update();
|
||||
return;
|
||||
}
|
||||
@ -1678,7 +1679,7 @@
|
||||
l = unread.replies.length;
|
||||
if (g.dead) {
|
||||
if (l > 0) {
|
||||
href = Favicon.headHalo;
|
||||
href = Favicon.deadHalo;
|
||||
} else {
|
||||
href = Favicon.dead;
|
||||
}
|
||||
@ -1692,6 +1693,7 @@
|
||||
favicon = $('link[rel="shortcut icon"]', d.head);
|
||||
clone = favicon.cloneNode(true);
|
||||
clone.href = href;
|
||||
clone.setAttribute('type', 'image/x-icon');
|
||||
return $.replace(favicon, clone);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1055,6 +1055,7 @@ updater =
|
||||
input.disabled = true
|
||||
input.value = 404
|
||||
d.title = d.title.match(/.+- /)[0] + 404
|
||||
g.dead = true
|
||||
Favicon.update()
|
||||
return
|
||||
|
||||
@ -1309,7 +1310,7 @@ Favicon =
|
||||
l = unread.replies.length
|
||||
if g.dead
|
||||
if l > 0
|
||||
href = Favicon.headHalo
|
||||
href = Favicon.deadHalo
|
||||
else
|
||||
href = Favicon.dead
|
||||
else
|
||||
@ -1318,10 +1319,11 @@ Favicon =
|
||||
else
|
||||
href = Favicon.default
|
||||
|
||||
#XXX `favicon.href = href` doesn't work
|
||||
#XXX `favicon.href = href` doesn't work on Firefox
|
||||
favicon = $ 'link[rel="shortcut icon"]', d.head
|
||||
clone = favicon.cloneNode true
|
||||
clone.href = href
|
||||
clone.setAttribute 'type', 'image/x-icon'
|
||||
$.replace favicon, clone
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user