summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-13 18:09:21 +0300
committerAndrew Dolgov <[email protected]>2020-09-13 18:09:21 +0300
commitb250050acdc311c975ecf410408e94516e05932b (patch)
treea939e220209627024f8d008a36e5d6c8ab7d911d /js
parentdc85d1d79903e7652058b3f10130fb44f147909d (diff)
filter out embedded colors
Diffstat (limited to 'js')
-rw-r--r--js/reader.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/reader.js b/js/reader.js
index d5626f2..6d4b19e 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -709,7 +709,7 @@ const Reader = {
$.each(window.book.rendition.getContents(), function(i, c) {
console.log('applying rendition theme', theme, 'to', c, c.document);
- $(c.document).find("#theme_css").text(Reader.Loader._res_data[theme_url])
+ $(c.document).find("#theme_css").text(Reader.Loader._res_data[theme_url]);
$(c.document).find("p")
.filter((i, e) => { if ($(e).text().length >= MIN_LENGTH_TO_JUSTIFY) return e; })
@@ -717,7 +717,10 @@ const Reader = {
/* embedded styles may conflict with our font sizes, etc */
$(c.document).find("p, span, em, strong, body")
- .attr("class", "");
+ .attr("class", "")
+ .css("color", "inherit")
+ .css("background", "inherit")
+ .css("background-color", "inherit")
$(c.document).find("p")
.css("text-indent", "1em");