summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-05-20 18:46:06 +0300
committerAndrew Dolgov <[email protected]>2018-05-20 18:46:06 +0300
commitd56fb62bd69f0be782b02ed2dcbe4c96b9d2ca0e (patch)
tree2bbf814cb8c5a2d6b2c9932761cc6080c592faa4 /js
parent9599d67bcd04762b94f596edb013eee299046c92 (diff)
use on-startup resource loading for iframe; and synchronouse switching for themes
Diffstat (limited to 'js')
-rw-r--r--js/read.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/js/read.js b/js/read.js
index 04b1e47..edbc2de 100644
--- a/js/read.js
+++ b/js/read.js
@@ -272,15 +272,11 @@ function apply_theme() {
else
theme = theme.replace("/", "");
- var themeUrl = baseUrl + "themes/" + theme + ".css";
+ var theme_url = baseUrl + "themes/" + theme + ".css";
- $("#theme_css").attr("href", themeUrl);
- //$(book.renderer.doc).find("#theme_css").attr('href', themeUrl);
-
- window.parent.$.get(baseUrl + 'themes/' + theme + '.css', function(data) {
- $(book.renderer.doc).find("#theme_css").html(data);
- });
+ $("#theme_css").attr("href", theme_url);
+ $(book.renderer.doc).find("#theme_css").text(_res_data[theme_url]);
});
}