How about making it actually work?
This commit is contained in:
parent
b9924973c5
commit
9c895eb632
@ -11983,10 +11983,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Navigate.updateTitle(board);
|
Navigate.updateTitle(board);
|
||||||
_ref = board.ws_board ? [(d.cookie.match(/ws\_style\=[^;]+/) || ['Yotsuba B New'])[0], 'ws_style'] : [(d.cookie.match(/nws\_style\=[^;]+/) || ['Yotsuba New'])[0], 'nws_style'], style = _ref[0], type = _ref[1];
|
_ref = board.ws_board ? [(d.cookie.match(/ws\_style\=([^;]+)/) || ['', 'Yotsuba B New'])[1], 'ws_style'] : [(d.cookie.match(/nws\_style\=([^;]+)/) || ['', 'Yotsuba New'])[1], 'nws_style'], style = _ref[0], type = _ref[1];
|
||||||
$.globalEval("var style_group = '" + type + "'");
|
$.globalEval("var style_group = '" + type + "'");
|
||||||
mainStyleSheet = $('link[title=switch]', d.head);
|
mainStyleSheet = $('link[title=switch]', d.head);
|
||||||
newStyleSheet = $("link[rel='alternate stylesheet'][title='" + style + "']", d.head);
|
newStyleSheet = $("link[title='" + style + "']", d.head);
|
||||||
mainStyleSheet.href = newStyleSheet.href;
|
mainStyleSheet.href = newStyleSheet.href;
|
||||||
return Main.initStyle();
|
return Main.initStyle();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11972,10 +11972,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Navigate.updateTitle(board);
|
Navigate.updateTitle(board);
|
||||||
_ref = board.ws_board ? [(d.cookie.match(/ws\_style\=[^;]+/) || ['Yotsuba B New'])[0], 'ws_style'] : [(d.cookie.match(/nws\_style\=[^;]+/) || ['Yotsuba New'])[0], 'nws_style'], style = _ref[0], type = _ref[1];
|
_ref = board.ws_board ? [(d.cookie.match(/ws\_style\=([^;]+)/) || ['', 'Yotsuba B New'])[1], 'ws_style'] : [(d.cookie.match(/nws\_style\=([^;]+)/) || ['', 'Yotsuba New'])[1], 'nws_style'], style = _ref[0], type = _ref[1];
|
||||||
$.globalEval("var style_group = '" + type + "'");
|
$.globalEval("var style_group = '" + type + "'");
|
||||||
mainStyleSheet = $('link[title=switch]', d.head);
|
mainStyleSheet = $('link[title=switch]', d.head);
|
||||||
newStyleSheet = $("link[rel='alternate stylesheet'][title='" + style + "']", d.head);
|
newStyleSheet = $("link[title='" + style + "']", d.head);
|
||||||
mainStyleSheet.href = newStyleSheet.href;
|
mainStyleSheet.href = newStyleSheet.href;
|
||||||
return Main.initStyle();
|
return Main.initStyle();
|
||||||
};
|
};
|
||||||
|
|||||||
@ -137,17 +137,17 @@ Navigate =
|
|||||||
return unless board
|
return unless board
|
||||||
Navigate.updateTitle board
|
Navigate.updateTitle board
|
||||||
[style, type] = if board.ws_board then [
|
[style, type] = if board.ws_board then [
|
||||||
(d.cookie.match(/ws\_style\=[^;]+/) or ['Yotsuba B New'])[0]
|
(d.cookie.match(/ws\_style\=([^;]+)/) or ['', 'Yotsuba B New'])[1]
|
||||||
'ws_style'
|
'ws_style'
|
||||||
] else [
|
] else [
|
||||||
(d.cookie.match(/nws\_style\=[^;]+/) or ['Yotsuba New'])[0]
|
(d.cookie.match(/nws\_style\=([^;]+)/) or ['', 'Yotsuba New'])[1]
|
||||||
'nws_style'
|
'nws_style'
|
||||||
]
|
]
|
||||||
|
|
||||||
$.globalEval "var style_group = '#{type}'"
|
$.globalEval "var style_group = '#{type}'"
|
||||||
|
|
||||||
mainStyleSheet = $ 'link[title=switch]', d.head
|
mainStyleSheet = $ 'link[title=switch]', d.head
|
||||||
newStyleSheet = $ "link[rel='alternate stylesheet'][title='#{style}']", d.head
|
newStyleSheet = $ "link[title='#{style}']", d.head
|
||||||
|
|
||||||
mainStyleSheet.href = newStyleSheet.href
|
mainStyleSheet.href = newStyleSheet.href
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user