mirror of
https://github.com/Andre-Bzk/AnyClip.git
synced 2026-11-15 15:43:07 +01:00
Empfehlungen und consent filter erweitert/gefixt
This commit is contained in:
+12
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user