Show all icons in Favicon settings. #1191
This commit is contained in:
parent
10f1b22ebc
commit
49aca5c78c
@ -649,10 +649,11 @@ Settings =
|
||||
Favicon.switch()
|
||||
Unread.update() if g.VIEW is 'thread' and Conf['Unread Favicon']
|
||||
img = @nextElementSibling.children
|
||||
img[0].src = Favicon.default
|
||||
img[1].src = Favicon.unreadSFW
|
||||
img[2].src = Favicon.unreadNSFW
|
||||
img[3].src = Favicon.unreadDead
|
||||
f = Favicon
|
||||
for icon, i in [f.SFW, f.unreadSFW, f.unreadSFWY, f.NSFW, f.unreadNSFW, f.unreadNSFWY, f.dead, f.unreadDead, f.unreadDeadY]
|
||||
$.add @nextElementSibling, $.el('img') unless img[i]
|
||||
img[i].src = icon
|
||||
return
|
||||
|
||||
togglecss: ->
|
||||
if $('textarea[name=usercss]', $.x 'ancestor::fieldset[1]', @).disabled = $.id('apply-css').disabled = !@checked
|
||||
|
||||
@ -112,12 +112,7 @@
|
||||
<option value="Original">Original</option>
|
||||
<option value="Metro">Metro</option>
|
||||
</select>
|
||||
<span class="favicon-preview">
|
||||
<img src="data:image/gif;base64,R0lGODlhEAAQAPAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAIOhI%2Bpy%2B0Po5y02ouzPgUAOw%3D%3D">
|
||||
<img src="data:image/gif;base64,R0lGODlhEAAQAPAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAIOhI%2Bpy%2B0Po5y02ouzPgUAOw%3D%3D">
|
||||
<img src="data:image/gif;base64,R0lGODlhEAAQAPAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAIOhI%2Bpy%2B0Po5y02ouzPgUAOw%3D%3D">
|
||||
<img src="data:image/gif;base64,R0lGODlhEAAQAPAAAAAAAAAAACH5BAEAAAAALAAAAAAQABAAAAIOhI%2Bpy%2B0Po5y02ouzPgUAOw%3D%3D">
|
||||
</span>
|
||||
<span class="favicon-preview"></span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
||||
@ -5,7 +5,7 @@ Favicon =
|
||||
initAsap: ->
|
||||
Favicon.el.type = 'image/x-icon'
|
||||
{href} = Favicon.el
|
||||
Favicon.SFW = /ws\.ico$/.test href
|
||||
Favicon.isSFW = /ws\.ico$/.test href
|
||||
Favicon.default = href
|
||||
Favicon.switch()
|
||||
|
||||
@ -71,12 +71,14 @@ Favicon =
|
||||
f.update()
|
||||
|
||||
update: ->
|
||||
if @SFW
|
||||
if @isSFW
|
||||
@unread = @unreadSFW
|
||||
@unreadY = @unreadSFWY
|
||||
else
|
||||
@unread = @unreadNSFW
|
||||
@unreadY = @unreadNSFWY
|
||||
|
||||
SFW: '//s.4cdn.org/image/favicon-ws.ico'
|
||||
NSFW: '//s.4cdn.org/image/favicon.ico'
|
||||
dead: 'data:image/gif;base64,<%= readBase64('dead.gif') %>'
|
||||
logo: 'data:image/png;base64,<%= readBase64('/src/meta/icon128.png') %>'
|
||||
|
||||
@ -638,6 +638,12 @@ div[data-checked="false"] > .suboption-list {
|
||||
font-style: normal;
|
||||
font-size: 11px;
|
||||
}
|
||||
.favicon-preview > img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.favicon-preview > img:nth-of-type(3n+1) {
|
||||
margin-left: 4px;
|
||||
}
|
||||
.section-keybinds .field {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user