fix style switching on navigate
This commit is contained in:
parent
9773307a9a
commit
db486e360e
@ -164,7 +164,7 @@ Navigate =
|
|||||||
Favicon.update()
|
Favicon.update()
|
||||||
|
|
||||||
findStyle = (type, base) ->
|
findStyle = (type, base) ->
|
||||||
style = d.cookie.match new RegExp "\b#{type}\_style\=([^;]+);\b"
|
style = d.cookie.match new RegExp "\\b#{type}_style=([^;]+)"
|
||||||
return ["#{type}_style", (if style then style[1] else base)]
|
return ["#{type}_style", (if style then style[1] else base)]
|
||||||
|
|
||||||
style = if sfw
|
style = if sfw
|
||||||
@ -172,7 +172,7 @@ Navigate =
|
|||||||
else
|
else
|
||||||
findStyle 'nws', 'Yotsuba New'
|
findStyle 'nws', 'Yotsuba New'
|
||||||
|
|
||||||
$.globalEval "var style_group = '#{style[0]}'"
|
$.globalEval "var style_group = #{JSON.stringify style[0]}"
|
||||||
|
|
||||||
$('link[title=switch]', d.head).href = $("link[title='#{style[1]}']", d.head).href
|
$('link[title=switch]', d.head).href = $("link[title='#{style[1]}']", d.head).href
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user