summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/read.js7
-rw-r--r--read.html5
2 files changed, 9 insertions, 3 deletions
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);
diff --git a/read.html b/read.html
index 24ac43c..d68d58b 100644
--- a/read.html
+++ b/read.html
@@ -375,7 +375,10 @@
localforage.getItem("epube.theme").then(function(theme) {
var baseUrl = window.location.href.match(/^.*\//)[0];
- if (!theme) theme = 'default';
+ if (!theme)
+ theme = 'default';
+ else
+ theme = theme.replace("/", "");
$(book.renderer.doc.head)
.append($("<link rel='stylesheet' id='theme_css' type='text/css'>")