diff options
author | Andrew Dolgov <[email protected]> | 2020-09-13 18:09:21 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-13 18:09:21 +0300 |
commit | b250050acdc311c975ecf410408e94516e05932b (patch) | |
tree | a939e220209627024f8d008a36e5d6c8ab7d911d /js | |
parent | dc85d1d79903e7652058b3f10130fb44f147909d (diff) |
filter out embedded colors
Diffstat (limited to 'js')
-rw-r--r-- | js/reader.js | 7 |
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"); |