-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Block elements with class/id as banner, as these are often ads.
To avoid false positives, we should check if it actually contains an ad.
Often, this will catch types of ads that don't use iframes and our thing can't detect (usually bespoke ad stuff).
However, I have found something which lets us detect parts of the page that are likely ads (or a part of a ad): <a rel="sponsored" ...>.
Another option is to search for the text ad - although that can't be done in a CSS selector.
So we need to select elements matching [class*="banner"] a[rel*="sponsored"] - but need to careful to only delete the innermost banner (there might be other useful content in the banner) or in general just be careful about how much we're deleting.
(but be slightly more intelligent to detect words properly)
Website to test it on: https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter