diff options
author | Andrew Dolgov <[email protected]> | 2018-05-20 18:46:06 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-05-20 18:46:06 +0300 |
commit | d56fb62bd69f0be782b02ed2dcbe4c96b9d2ca0e (patch) | |
tree | 2bbf814cb8c5a2d6b2c9932761cc6080c592faa4 /js | |
parent | 9599d67bcd04762b94f596edb013eee299046c92 (diff) |
use on-startup resource loading for iframe; and synchronouse switching for themes
Diffstat (limited to 'js')
-rw-r--r-- | js/read.js | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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]); }); } |