Consolidate Unread Favicon code a bit.
This commit is contained in:
parent
e98c2d1cc6
commit
8f7c22d32c
@ -228,26 +228,15 @@ Unread =
|
|||||||
unread: count
|
unread: count
|
||||||
quotingYou: countQuotingYou
|
quotingYou: countQuotingYou
|
||||||
|
|
||||||
return unless Conf['Unread Favicon']
|
if Conf['Unread Favicon']
|
||||||
|
{isDead} = Unread.thread
|
||||||
Favicon.el.href =
|
Favicon.el.href =
|
||||||
if Unread.thread.isDead
|
|
||||||
if countQuotingYou
|
if countQuotingYou
|
||||||
Favicon.unreadDeadY
|
Favicon[if isDead then 'unreadDeadY' else 'unreadY']
|
||||||
else if count
|
else if count
|
||||||
Favicon.unreadDead
|
Favicon[if isDead then 'unreadDead' else 'unread']
|
||||||
else
|
else
|
||||||
Favicon.dead
|
Favicon[if isDead then 'dead' else 'default']
|
||||||
else
|
unless chrome?
|
||||||
if count
|
|
||||||
if countQuotingYou
|
|
||||||
Favicon.unreadY
|
|
||||||
else
|
|
||||||
Favicon.unread
|
|
||||||
else
|
|
||||||
Favicon.default
|
|
||||||
|
|
||||||
<% if (type === 'userscript') { %>
|
|
||||||
# `favicon.href = href` doesn't work on Firefox.
|
# `favicon.href = href` doesn't work on Firefox.
|
||||||
$.add d.head, Favicon.el
|
$.add d.head, Favicon.el
|
||||||
<% } %>
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user