Support cosmetic filters with explicit style properties (original) (raw)

Issue reek/anti-adblock-killer#639 made me realize it could be very useful to support explicit style properties for cosmetic filters. Conceptually, all block cosmetic filters implicitly apply the display: none !important; style property.

However, in the cat and mouse game between blockers and anti-blockers, some sites will actually hide the legitimate content by default, and un-hide it if and only if the page does not detect a blocker -- this is what is happening with reek/anti-adblock-killer#639.

Supporting explicit style properties for specific block cosmetic filters is an elegant extension to cosmetic filtering, and I expect this will often result in not having to use a user script to make a page works fine. For the specific example mentioned above, the new cosmetic filters would look like:

freeskier.com###adb-not-enabled {display: block;}
freeskier.com###videoContainer {display: block;}

And this would allow to do away with the use of Tampermonkey/Greasemonkey with a specific user script.