[Done] Site-specific filters

Various discussions related to Adblock Plus development
Wladimir Palant

Post by Wladimir Palant »

I don't see $url= being implemented, this would significantly overcomplicate things. Generally, if we do that pipes won't be the only problem - regular expression can contain just about anything. So we either say that $url must always be the last option and everything that follows is its value or we say that the value must be put in quotation marks if it has any special characters.
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Post by Adblock Plus Fan »

Wladimir Palant wrote:I don't see $url= being implemented
Then the current syntax seems pretty good to me. I don't see any problems with
foo.com/ad$domain=foo.com|bar.com|~baz.bar.com


Anyway, I've been thinking a little about making it look like element hiding rules with comma separation.
What if we took Rick's example:

Code: Select all

google-analytics$domain=~a.com|~b.com|~c.com
And made it like this:

Code: Select all

google-analytics$@@a.com,@@b.com,@@c.com
Would it be feasible from a performance standpoint to separate each domain exemption/restriction into its own filter option?

This way they would reminiscence of the real whitelists, and they would be separated by comma like element hiding rules too.

But then the inverse ($domain=foo.com) would have to look like $@@~foo.com.

I have no idea if this is sensible at all though... Just brainstorming.
Wladimir Palant

Post by Wladimir Palant »

One problem is - we can only drive the analogy to element hiding so far. In the end we cannot have domain exceptions in element hiding rules. But people will expect that it should work for element hiding rules if the syntax is the same.

But the other question is: if we make $@@foo.com an exception for a single domain we need similar syntax to include a domain. I don't see anything that would be easy to recognize/understand.
Wladimir Palant

Post by Wladimir Palant »

That seems to be another application: http://adblockplus.org/forum/viewtopic.php?t=3278
I can imagine filters like "*$object,domain=~foo.com|~bar.com"
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Post by Ares2 »

Another request I've seen some times is to only use ABP on pages that deserve it (= use really annoying ads).

This would work with

Code: Select all

@@*$domain=~annoy.com|~usinglayerads.com
in addition to a filter subscription.
SlimShady
Posts: 49
Joined: Sat Sep 09, 2006 12:49 pm

Post by SlimShady »

It does make the filter(s) crowded. Personally I'd rather have a per-domain filter group.
But I'm fine with this if it helps the filter subscriptions. Making it more efficient.
Wladimir Palant

Post by Wladimir Palant »

@Ares2: Actually, better this one:

Code: Select all

@@*$document,domain=~annoy.com|~usinglayerads.com
That will entirely disable ABP (including element hiding) on all sites but the ones specified. Nice indeed, this is definitely worth implementing.
anklebone
Posts: 6
Joined: Fri Dec 19, 2008 12:48 pm

Post by anklebone »

I think this would be very useful. Specifically, I'd like to be able to to block certain third-party javascript (and images etc) from loading on all sites, except for those that I've specifically allowed.

I imagine the interface being similar to that of NoScript, allowing the user to easily choose certain things that should be allowed to load on the current domain/subdomain/url.
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Post by Adblock Plus Fan »

anklebone wrote:I think this would be very useful. Specifically, I'd like to be able to to block certain third-party javascript (and images etc) from loading on all sites, except for those that I've specifically allowed.
Indeed. Say We have this filter:

Code: Select all

*$third-party,script
This should be pretty much the equivalence of the Noscript setting "Temporarily allow top-level sites by default".
You could do something like this:

Code: Select all

*$third-party,script$domain=~a.com
This is suboptimal though, since it allows all 3rd party scripts on that site.

There might be a situation where the site has 3rd party scripts from 10 different parties, and we only want to allow one.
Then we can do this:

Code: Select all

@@google-analytics$script,domain=a.com
So we'll have the capability to lock the allowance to only the sites we have permitted.

This is superior to what Noscript currently is able to do:

Code: Select all

@@google-analytics$script
So if a website has strong-armed you into allowing a script, you would be forced to allow this script for all sites in Noscript.
But with ABP, we can keep the damage to a minimum and only allow the script for that 1 particular site. This is way better than what's currently possible in Noscript.
anklebone
Posts: 6
Joined: Fri Dec 19, 2008 12:48 pm

Post by anklebone »

Adblock Plus Fan wrote: There might be a situation where the site has 3rd party scripts from 10 different parties, and we only want to allow one.
Then we can do this:

Code: Select all

@@google-analytics$script,domain=a.com
So we'll have the capability to lock the allowance to only the sites we have permitted.

This is superior to what Noscript currently is able to do:

Code: Select all

@@google-analytics$script
So if a website has strong-armed you into allowing a script, you would be forced to allow this script for all sites in Noscript.
But with ABP, we can keep the damage to a minimum and only allow the script for that 1 particular site. This is way better than what's currently possible in Noscript.
Yes, that sounds perfect.
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

This filtering flexibility will be unsurpassed by ANYTHING out there right now. There will also be some techniques used by some sites that will become worthless.

I can't wait for this option to become mainstream. It will certainly keep the filter guys busy with new ideas for rules :)

The recent options are exciting stuff :mrgreen:
smk
Posts: 100
Joined: Mon Jul 14, 2008 6:54 am

Re:

Post by smk »

I always thought customized-lists would be good, and maybe they can come here
rather than separating things by ","
why not make a sub-list to the rule?

Code: Select all

@@*$document,domain
    -domain options:
        @@annoy.com
        @@usinglayerads.com
        @@/annoy\d+/
yeah, all this is getting amazing :)
I hope the next-thing to do is implement html-blocking when firefox 3.1 comes out :)
Dipole Moment

Post by Dipole Moment »

smk wrote: I hope the next-thing to do is implement html-blocking when firefox 3.1 comes out :)
Don't forget XML and JS...
Wladimir Palant

Post by Wladimir Palant »

This is mostly done now: http://hg.mozdev.org/adblockplus/rev/c6ee27f5595d

I still need to add some help text to filter composer to explain the format. I also want a context menu entry "Disable/re-enable filter on foo.com" in blockable items (for user-defined filters only) but that will take somewhat longer - won't be in the next development build.
chris

Post by chris »

when do site specific filters go live and not jsut developmental builds?
Locked