fix style switching on navigate

This commit is contained in:
ccd0 2014-05-15 09:25:34 -07:00
parent 9773307a9a
commit db486e360e

View File

@ -164,7 +164,7 @@ Navigate =
Favicon.update()
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)]
style = if sfw
@ -172,7 +172,7 @@ Navigate =
else
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