about summary refs log tree commit diff stats
path: root/js/reader.js
diff options
context:
space:
mode:
authorAndrew Dolgov <noreply@fakecake.org>2021-05-17 09:02:36 +0300
committerAndrew Dolgov <noreply@fakecake.org>2021-05-17 09:02:36 +0300
commiteeed72fcc51d8e92fdaae5bd2ee0f8b7a9148bfa (patch)
tree0098c5b81d56bff9dc14121dc2401fa97b77fdf9 /js/reader.js
parentc8b4ec5886068baf7f371cd02aaf854dcf2e9b2a (diff)
downloadthe-epube-eeed72fcc51d8e92fdaae5bd2ee0f8b7a9148bfa.tar.gz
the-epube-eeed72fcc51d8e92fdaae5bd2ee0f8b7a9148bfa.tar.xz
forbid borders in book content
Diffstat (limited to 'js/reader.js')
-rw-r--r--js/reader.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/reader.js b/js/reader.js
index e580a9e..84c965f 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -552,9 +552,19 @@ const Reader = {
 						.css("font-family", "inherit")
 						.css("font-size", "inherit")
 						.css("color", "")
+						.css("border", "none ! important")
 						.css("background", "")
 						.css("background-color", "");
 
+				// same as above except for allowed font-size
+				$(doc).find("h1, h1, h3, h4, h5")
+					.attr("class", "")
+					.css("font-family", "inherit")
+					.css("color", "")
+					.css("border", "none ! important")
+					.css("background", "")
+					.css("background-color", "");
+
 				if (typeof Reader.hyphenateHTML != "undefined") {
 					$(doc).find('p').each((i,p) => {
 						p = $(p);