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