From b250050acdc311c975ecf410408e94516e05932b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 13 Sep 2020 18:09:21 +0300 Subject: filter out embedded colors --- js/reader.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js') 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"); -- cgit v1.2.3