Jelajahi Sumber

don't mark as hidden elements with inline display = none

Gildas 6 tahun lalu
induk
melakukan
a1bf42fd9a
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lib/single-file/single-file-helper.js

+ 1 - 1
lib/single-file/single-file-helper.js

@@ -282,7 +282,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 			const visibility = computedStyle.getPropertyValue("visibility");
 			hidden = display == "none";
 			if (hidden) {
-				if (!IGNORED_REMOVED_TAG_NAMES.includes(element.tagName)) {
+				if (element.style.getPropertyValue("display") != "none" && !IGNORED_REMOVED_TAG_NAMES.includes(element.tagName)) {
 					element.setAttribute(HIDDEN_CONTENT_ATTRIBUTE_NAME, "");
 					markedElements.push(element);
 				}