1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-18 00:56:42 +01:00
This commit is contained in:
8chan Admin 2013-12-27 22:25:28 +00:00
parent f6fc87b3a6
commit 4adeaaa84c

View File

@ -76,6 +76,7 @@ function changeStyle(styleName, link) {
{% endraw %}
function init_stylechooser() {
var matches = document.URL.match(/\/(\w+)\/($|{{ config.dir.res|replace({'/': '\\/'}) }}{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }}|{{ config.file_index|replace({'.': '\\.'}) }}|{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }})/);
var newElement = document.createElement('div');
newElement.className = 'styles';
@ -103,6 +104,8 @@ function init_stylechooser() {
if (!localStorage.board_stylesheets) {
localStorage.board_stylesheets = '{}';
}
window.stylesheet_choices = JSON.parse(localStorage.board_stylesheets);
if (board_name && stylesheet_choices[board_name]) {
for (var styleName in styles) {
@ -128,11 +131,6 @@ function init_stylechooser() {
{% raw %}
}
var stylesheet_choices = JSON.parse(localStorage.board_stylesheets); {% endraw %}
var matches = document.URL.match(/\/(\w+)\/($|{{ config.dir.res|replace({'/': '\\/'}) }}{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }}|{{ config.file_index|replace({'.': '\\.'}) }}|{{ config.file_page|replace({'%d': '\\d+', '.': '\\.'}) }})/);
{% raw %}
function get_cookie(cookie_name) {
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)');
if (results)