Skip to content

Support cosmetic filters with explicit style properties #781

@gorhill

Description

@gorhill

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions