From 0af56d18e86ac90cdd53d8e79781777b3fa23688 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 1 Feb 2018 21:56:10 +0300 Subject: various fixes related to multi-theme support --- js/read.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/read.js b/js/read.js index 9d74792..ec85233 100644 --- a/js/read.js +++ b/js/read.js @@ -144,7 +144,12 @@ function apply_styles() { var lineHeight = res[2] ? res[2] + "%" : DEFAULT_LINE_HEIGHT + "%"; var themeName = res[3] ? res[3] : false; - $("#reader iframe").contents().find("*") + book.setStyle("fontSize", fontSize); + book.setStyle("fontFamily", fontFamily); + book.setStyle("lineHeight", lineHeight); + book.setStyle("textAlign", "justify"); + + $("#reader iframe").contents().find("p") .css("background", "") .css("color", "") .css("background-color", "") @@ -153,8 +158,6 @@ function apply_styles() { .css("line-height", lineHeight) .css("text-align", "justify"); - $("#reader").show(); - }); } -- cgit v1.2.3