fixed bug throwing TypeError with overlapping keywords

This commit is contained in:
17ms 2022-12-12 07:36:02 +02:00
parent 5bbde86d50
commit 709da823c0

View File

@ -13,7 +13,7 @@ window.addEventListener("load", function () {
for (let i = 0; i < data.length; ++i) { for (let i = 0; i < data.length; ++i) {
let inner_txt = data[i].innerText let inner_txt = data[i].innerText
for (let j = 0; j < keywords.length; ++j) { for (let j = 0; j < keywords.length; ++j) {
if (inner_txt.includes(keywords[j])) { if (inner_txt.includes(keywords[j]) && data[i].offsetParent !== null) {
data[i].offsetParent.style.display = "none" data[i].offsetParent.style.display = "none"
} }
} }