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;
|
input.value = 404;
|
||||||
}
|
}
|
||||||
d.title = d.title.match(/.+- /)[0] + 404;
|
d.title = d.title.match(/.+- /)[0] + 404;
|
||||||
|
g.dead = true;
|
||||||
Favicon.update();
|
Favicon.update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1678,7 +1679,7 @@
|
|||||||
l = unread.replies.length;
|
l = unread.replies.length;
|
||||||
if (g.dead) {
|
if (g.dead) {
|
||||||
if (l > 0) {
|
if (l > 0) {
|
||||||
href = Favicon.headHalo;
|
href = Favicon.deadHalo;
|
||||||
} else {
|
} else {
|
||||||
href = Favicon.dead;
|
href = Favicon.dead;
|
||||||
}
|
}
|
||||||
@ -1692,6 +1693,7 @@
|
|||||||
favicon = $('link[rel="shortcut icon"]', d.head);
|
favicon = $('link[rel="shortcut icon"]', d.head);
|
||||||
clone = favicon.cloneNode(true);
|
clone = favicon.cloneNode(true);
|
||||||
clone.href = href;
|
clone.href = href;
|
||||||
|
clone.setAttribute('type', 'image/x-icon');
|
||||||
return $.replace(favicon, clone);
|
return $.replace(favicon, clone);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1055,6 +1055,7 @@ updater =
|
|||||||
input.disabled = true
|
input.disabled = true
|
||||||
input.value = 404
|
input.value = 404
|
||||||
d.title = d.title.match(/.+- /)[0] + 404
|
d.title = d.title.match(/.+- /)[0] + 404
|
||||||
|
g.dead = true
|
||||||
Favicon.update()
|
Favicon.update()
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -1309,7 +1310,7 @@ Favicon =
|
|||||||
l = unread.replies.length
|
l = unread.replies.length
|
||||||
if g.dead
|
if g.dead
|
||||||
if l > 0
|
if l > 0
|
||||||
href = Favicon.headHalo
|
href = Favicon.deadHalo
|
||||||
else
|
else
|
||||||
href = Favicon.dead
|
href = Favicon.dead
|
||||||
else
|
else
|
||||||
@ -1318,10 +1319,11 @@ Favicon =
|
|||||||
else
|
else
|
||||||
href = Favicon.default
|
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
|
favicon = $ 'link[rel="shortcut icon"]', d.head
|
||||||
clone = favicon.cloneNode true
|
clone = favicon.cloneNode true
|
||||||
clone.href = href
|
clone.href = href
|
||||||
|
clone.setAttribute 'type', 'image/x-icon'
|
||||||
$.replace favicon, clone
|
$.replace favicon, clone
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user