Empfehlungen und consent filter erweitert/gefixt

This commit is contained in:
Andre
2026-03-28 12:35:09 +01:00
parent 927c5efa6e
commit d05365be9b
+12 -1
View File
@@ -162,6 +162,13 @@ function cleanClone(node) {
".aawp-disclaimer",
"[id^='div-gpt-ad-']",
"[class*='adslot']",
"[id*='upscore']",
"[class*='c-ad-container']",
"[data-consent-service-id]",
".tg-crosslinks",
".tg-leseempfehlung",
".c-suggestNews-container",
"[class*='c-crosslinks']",
".social-links",
".social-tooltip",
"#shr-btns",
@@ -472,7 +479,7 @@ function removeEditorialRecommendationSections(root) {
root.querySelectorAll(selector).forEach((el) => el.remove());
});
const headings = Array.from(root.querySelectorAll('h2, h3, h4'));
const headings = Array.from(root.querySelectorAll('h2, h3, h4, .h2, .h3, .h4, [class="h2"], [class="h3"], [class="h4"]'));
for (const heading of headings) {
const text = (heading.textContent || '').trim();
@@ -541,6 +548,10 @@ function isPromotionalTextBlock(text) {
return true;
}
if (/empfohlene redaktionelle inhalte/.test(text) || /consent-einstellungen/.test(text)) {
return true;
}
if (/kein bock auf werbung\?/.test(text)) {
return true;
}