|
|
@ -115,7 +115,10 @@ var styles = { |
|
|
|
{% for stylesheet in stylesheets %}{% raw %}'{% endraw %}{{ stylesheet.name|addslashes }}{% raw %}' : '{% endraw %}{{ stylesheet.uri|addslashes }}{% raw %}', |
|
|
|
{% endraw %}{% endfor %}{% raw %} |
|
|
|
}; |
|
|
|
var board_name = false; |
|
|
|
|
|
|
|
if (typeof board_name === 'undefined') { |
|
|
|
var board_name = false; |
|
|
|
} |
|
|
|
|
|
|
|
function changeStyle(styleName, link) { |
|
|
|
{% endraw %} |
|
|
@ -159,13 +162,7 @@ function changeStyle(styleName, link) { |
|
|
|
|
|
|
|
{% endraw %} |
|
|
|
{% if config.stylesheets_board %} |
|
|
|
{# This is such an unacceptable mess. There needs to be an easier way. #} |
|
|
|
{# Needs fix for slugify #} |
|
|
|
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 %} |
|
|
|
if (matches) { |
|
|
|
board_name = matches[1]; |
|
|
|
} |
|
|
|
|
|
|
|
if (!localStorage.board_stylesheets) { |
|
|
|
localStorage.board_stylesheets = '{}'; |
|
|
|