From db486e360ea15f7fcc12a8d59a85e7b20a7248d3 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Thu, 15 May 2014 09:25:34 -0700 Subject: [PATCH] fix style switching on navigate --- src/General/Navigate.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/General/Navigate.coffee b/src/General/Navigate.coffee index 8ecbf8661..268e0f029 100644 --- a/src/General/Navigate.coffee +++ b/src/General/Navigate.coffee @@ -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