|
|
@@ -77,6 +77,11 @@ this.docHelper = this.docHelper || (() => {
|
|
|
markHiddenCandidates(win, doc.body, styles, false, markerRemovedContent, new Set(), ignoredTags);
|
|
|
markHiddenElements(win, doc.body, styles, markerRemovedContent);
|
|
|
markBackdropBackground(doc, win, markerRemovedContent);
|
|
|
+ doc.querySelectorAll("iframe").forEach(element => {
|
|
|
+ if (testHiddenElement(element, styles.get(element))) {
|
|
|
+ element.srcdoc = "<html>";
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
if (options.removeAlternativeFonts) {
|
|
|
usedFonts = getUsedFonts(styles);
|
|
|
@@ -185,6 +190,9 @@ this.docHelper = this.docHelper || (() => {
|
|
|
if (!hidden && style) {
|
|
|
hidden = style.display == "none";
|
|
|
if (!hidden && (style.opacity == "0" || style.visibility == "hidden")) {
|
|
|
+ hidden = true;
|
|
|
+ }
|
|
|
+ if (!hidden) {
|
|
|
const boundingRect = element.getBoundingClientRect();
|
|
|
hidden = !boundingRect.width && !boundingRect.height;
|
|
|
}
|