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",
|
".aawp-disclaimer",
|
||||||
"[id^='div-gpt-ad-']",
|
"[id^='div-gpt-ad-']",
|
||||||
"[class*='adslot']",
|
"[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-links",
|
||||||
".social-tooltip",
|
".social-tooltip",
|
||||||
"#shr-btns",
|
"#shr-btns",
|
||||||
@@ -472,7 +479,7 @@ function removeEditorialRecommendationSections(root) {
|
|||||||
root.querySelectorAll(selector).forEach((el) => el.remove());
|
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) {
|
for (const heading of headings) {
|
||||||
const text = (heading.textContent || '').trim();
|
const text = (heading.textContent || '').trim();
|
||||||
@@ -541,6 +548,10 @@ function isPromotionalTextBlock(text) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (/empfohlene redaktionelle inhalte/.test(text) || /consent-einstellungen/.test(text)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (/kein bock auf werbung\?/.test(text)) {
|
if (/kein bock auf werbung\?/.test(text)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user