Skip to content

Commit

Permalink
Add TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcellPerger1 authored Sep 15, 2023
1 parent 32639de commit 849ff04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/adblocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
}
}
})({
// TODO!! delete #aipPrerollContainer or detect ~aip
cls: ['adsbygoogle', 'mod_ad_container', 'brn-ads-box','gpt-ad','ad-box','top-ads-container', 'adthrive-ad'],
selector: ['[aria-label="advertisement"]', '[class*="-ad "], [class*="-ad-"], [class$="-ad"], [class^="ad-"], [class^="adthrive"]', ':is(div,iframe)[id^="google_ads_iframe_"]'],
/** @type {{selector: string?, func: (elem: Element) => any}[]} */
Expand All @@ -53,6 +54,7 @@
selector: '[class*="ad"],[id*="ad"]',
func(elem) {
for (const name of [elem.id, ...elem.classList]) {
// TODO also check lowercase followed by uppercase at end e.g. adBox
if(/(?<!lo|re|he)ad(vertisement)?s?(thrive)?(content)?(engine|ngin)?(container)?s?($|[-_,\s])/.test(name)) {
return true;
}
Expand Down

0 comments on commit 849ff04

Please sign in to comment.