From a96443e152a1d09944839d21a3ebd709bd161cf7 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 13 May 2018 14:29:23 +0300 Subject: minor offline-related fixes --- js/read.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/read.js b/js/read.js index b0b7cff..8d38ccd 100644 --- a/js/read.js +++ b/js/read.js @@ -267,9 +267,12 @@ function apply_theme() { var baseUrl = window.location.href.match(/^.*\//)[0]; - if (!theme) theme = 'default'; + if (!theme) + theme = 'default'; + else + theme = theme.replace("/", ""); - var themeUrl = baseUrl + "/themes/" + theme + ".css"; + var themeUrl = baseUrl + "themes/" + theme + ".css"; $("#theme_css").attr("href", themeUrl); $(book.renderer.doc).find("#theme_css").attr('href', themeUrl); -- cgit v1.2.3