[Done] Site-specific filters

Various discussions related to Adblock Plus development

Postby Wladimir Palant » Tue Dec 16, 2008 7:27 pm

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.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Adblock Plus Fan » Tue Dec 16, 2008 9:16 pm

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.
User avatar
Adblock Plus Fan
 
Posts: 1255
Joined: Sat Feb 24, 2007 12:08 pm

Postby Wladimir Palant » Tue Dec 16, 2008 10:16 pm

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
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Wladimir Palant » Wed Dec 17, 2008 8:22 am

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"
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby Ares2 » Wed Dec 17, 2008 2:39 pm

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.
Ares2
 
Posts: 1275
Joined: Fri Feb 15, 2008 1:47 pm

Postby SlimShady » Wed Dec 17, 2008 2:51 pm

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.
SlimShady
 
Posts: 49
Joined: Sat Sep 09, 2006 12:49 pm

Postby Wladimir Palant » Wed Dec 17, 2008 3:11 pm

@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.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby anklebone » Fri Dec 19, 2008 1:50 pm

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.
anklebone
 
Posts: 6
Joined: Fri Dec 19, 2008 1:48 pm

Postby Adblock Plus Fan » Fri Dec 19, 2008 6:46 pm

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.
User avatar
Adblock Plus Fan
 
Posts: 1255
Joined: Sat Feb 24, 2007 12:08 pm

Postby anklebone » Fri Dec 19, 2008 7:16 pm

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.
anklebone
 
Posts: 6
Joined: Fri Dec 19, 2008 1:48 pm

Postby rick752 » Sat Dec 20, 2008 12:32 am

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:
User avatar
rick752
 
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA

Re:

Postby smk » Sat Dec 20, 2008 3:27 pm

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 :)
smk
 
Posts: 100
Joined: Mon Jul 14, 2008 6:54 am

Postby Dipole Moment » Sat Dec 20, 2008 4:33 pm

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...
Dipole Moment
 

Postby Wladimir Palant » Sun Dec 21, 2008 5:42 am

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.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Postby chris » Tue Dec 23, 2008 1:41 am

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

PreviousNext

Return to Adblock Plus development

Who is online

Users browsing this forum: No registered users and 6 guests