|
|
@@ -89,14 +89,14 @@ this.docHelper = this.docHelper || (() => {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
- function markHiddenCandidates(win, element, markerRemovedContent, markerRemovedCandidateStage, ignoredTags) {
|
|
|
+ function markHiddenCandidates(win, element, markerRemovedContent, markerRemovedCandidate, ignoredTags) {
|
|
|
const elements = Array.from(element.childNodes).filter(node => node.nodeType == Node.ELEMENT_NODE);
|
|
|
- elements.forEach(element => markHiddenCandidates(win, element, markerRemovedContent, markerRemovedCandidateStage, ignoredTags));
|
|
|
+ elements.forEach(element => markHiddenCandidates(win, element, markerRemovedContent, markerRemovedCandidate, ignoredTags));
|
|
|
if (elements.length) {
|
|
|
- const hiddenCandidate = !elements.find(element => element.getAttribute(markerRemovedCandidateStage) !== "");
|
|
|
+ const hiddenCandidate = !elements.find(element => element.getAttribute(markerRemovedCandidate) !== "");
|
|
|
if (hiddenCandidate) {
|
|
|
if (hiddenElement(element, ignoredTags) && element instanceof win.HTMLElement) {
|
|
|
- element.setAttribute(markerRemovedCandidateStage, "");
|
|
|
+ element.setAttribute(markerRemovedCandidate, "");
|
|
|
elements.forEach(element => {
|
|
|
if (element instanceof win.HTMLElement) {
|
|
|
element.setAttribute(markerRemovedContent, "");
|
|
|
@@ -105,7 +105,7 @@ this.docHelper = this.docHelper || (() => {
|
|
|
}
|
|
|
}
|
|
|
} else if (hiddenElement(element, ignoredTags)) {
|
|
|
- element.setAttribute(markerRemovedCandidateStage, "");
|
|
|
+ element.setAttribute(markerRemovedCandidate, "");
|
|
|
}
|
|
|
}
|
|
|
|