Adblock Plus and (a little) more

New filter options $generichide and $genericblock · 2015-11-17 12:18 by Dave Vandyke

We have added two new filter options, $generichide and $genericblock which are already available in development builds and will be included in Adblock Plus 2.6.12 for Firefox and 1.9.4 for Chrome, Opera & Safari. They allow exception rules to be written that disable generic hiding or blocking rules for a given website whilst leaving site-specific rules intact.

This is an experimental feature that is still subject to change.

Some websites detect Adblock Plus by testing whether a certain generic rule is in effect. For example, if a file called “ads.js” isn’t loaded they might guess that the client is blocking adverts. The new options have been added to give filter authors more power to combat this, they provide a simple way to disable all generic rules for any websites that are found to be using this technique.

Here is an example rule that will disable generic hiding rules for the website adblockplus.org: @@||adblockplus.org^$generichide.

What counts as a generic rule? Currently, we define a generic rule as one that either applies to all domains, or all domains with a few exceptions. As long as a filter contains at least one domain or sitekey to match we consider it to be specific.
(Note that by this definition the blocking rule ||example.com^ is generic whereas */ads/*$domain=example.com is site-specific.)

Support for other platforms such as Internet Explorer is still in progress.

To the install page

Tags:

Comment [1]

  1. adref · 2015-12-02 20:25 · #

    Running ABP version 2.6.13 with EasyList which has the following rule ‘@@||prosieben.de^$genericblock,generichide’. Blockable items window shows a bunch of generic filters were applied in-spite of the above rule. For e.g. ‘##.block-advertisement’, ‘/adserver.’ etc.

    Reply from Dave Vandyke:

    Hi adref,

    Thanks for getting in touch. I’ve not managed to reproduce the problem as you’ve described. With only EasyList Germany enabled and up to date I only see rules specific to that domain being blocked in the blockable items window. With the @@||prosieben.de^$genericblock,generichide rule disabled I see a bunch of generic rules matching like I would expect.

    It’s worth noting that rules whitelisted by $generichide / $genericblock rules might appear as grey, not green in that tool. This is caused by how things are implemented, it was a trade off we made to improve performance.

    If you’re still having this issue though I would be grateful if you could report it in our issue tracker, perhaps there’s something more going on here that I’ve missed.

    Thanks, Dave.

Commenting is closed for this article.