Page 1 of 1

[Rejected] $not domain option (exception within a filter)

Posted: Sun Dec 13, 2009 9:28 pm
by Wladimir Palant
This suggestion comes from the Mozilla Russia forum. It boils down to a new filter option - $not. It could be used like this:

Code: Select all

||example.com^$not=*/no_ads_here/*
So, after not= a second filter (simple filter or regexp) can be specified - if the main filter matches the address the second filter will be tested. Only addresses where the main filter matches but the second doesn't are accepted. This is sort of a local exception rule.

A restriction: this option must be the last option specified (a filter can contain commas, these will be considered part of the filter rather than option separators).

What do subscription authors think about this? Is this useful? Is this too complex?

Re: $not domain option (exception within a filter)

Posted: Sun Dec 13, 2009 10:08 pm
by fanboy
so something like this would be vaild?

Code: Select all

||example.com,||test.com,||another.com^$not=*/no_ads_here/*
or

Code: Select all

||example.com^,||test.com^,||another.com^$not=*/no_ads_here/*,$not=*/ihateads/*

Re: $not domain option (exception within a filter)

Posted: Mon Dec 14, 2009 8:15 am
by Wladimir Palant
Nope, instead of the first one you would write:

Code: Select all

||example.com^$not=*/no_ads_here/*
||test.com^$not=*/no_ads_here/*
||another.com^$not=*/no_ads_here/*
As to the second, I guess that you could use regular expressions if you really have to:

Code: Select all

||example.com^$not=/\/(no_ads_here|ihateads)\//
As I mentioned, a comma is a valid part of the filter, you cannot use it to separate filters / filter options.

Re: $not domain option (exception within a filter)

Posted: Mon Dec 14, 2009 9:35 am
by ziutek
Why wouldn't it accept '|', like $domain?

I think that the proposition may be a bit overspecialized. It also encourages a style that is very prone to false positives. (I am not a subscription author.)

Re: $not domain option (exception within a filter)

Posted: Mon Dec 14, 2009 9:44 am
by Wladimir Palant
Because | is also a valid part of a filter, e.g. ||foo.bar or /(foo|bar)/.

Re: $not domain option (exception within a filter)

Posted: Wed Dec 16, 2009 4:06 pm
by MonztA
Hm, I don't really know if this is useful. Anyone has a good example where this could be advantageous?

Re: $not domain option (exception within a filter)

Posted: Wed Dec 16, 2009 4:15 pm
by Wladimir Palant
The original example was overclockers.ru. This site is mixing ads with regular images in its images directory. Right now RU AdList seems to block all Flash in that directory and resort to hiding for images. However, looking at it - I'm not very convinced that this proposal will help.

Re: $not domain option (exception within a filter)

Posted: Fri Dec 18, 2009 5:54 pm
by Lain_13
Hi there,

As I told before here (Russian language) I like this feature but I want to have fully functional feature instead of exception by text. I mean all text after "not=" should be treated like fully functional blocking rule with parameters section.

Examples:
||site.com/$not=*/img/$~object - block everything from site.com except of stuff from /img/ folder but block objects from this folder with other junk.
||site.com/$not=$not=/\/(?:fldr1|fldr2|fldr3)\// - block everything from folders fldr1, fldr2 and fldr3 on site.com (also it allows to make regexp for only 1 site).
||site.com/$not=*/fldr1/$not=*/fldr2/ - block everything from site.com except content of folder fldr1 excluding content of subfolder fldr2.

I think this feature should be as flexible as usual exception rule.

p.s. Of course amount of nested rules must be limited to some constant number. E.g. it should be limited to 5 levels.
p.p.s. Sorry for my Runglish. :)

Re: $not domain option (exception within a filter)

Posted: Fri Dec 18, 2009 10:48 pm
by Wladimir Palant
And as I told before - the "fully functional" feature is definitely not going to happen. I know that Russian users like getting complicated toys to play with. But this is really not useful enough for all the complexity it adds (both code complexity and complexity of filter reading/writing). As this goes right now, it doesn't look like even my proposal will be implemented - it would require at least one other filter subscription author to say "yes, that would be useful".

Re: $not domain option (exception within a filter)

Posted: Sat Dec 19, 2009 1:08 pm
by Michael
At the moment EasyList is slowly moving away from adding domain exceptions by using whitelists as alternatives; therefore I think that the $not suggestion would barely be used in the subscription.

Re: $not domain option (exception within a filter)

Posted: Mon Dec 21, 2009 8:23 am
by Wladimir Palant
Overall votum seems to be: not useful. Rejected.

Re: [Rejected] $not domain option (exception within a filter)

Posted: Mon Dec 21, 2009 11:30 am
by Wladimir Palant
Comment from Ares2 arrived too late:
Ares2 wrote:Sorry, looks like I'm late to the party. :-( Anyway, this option wouldn't have much value for the "Easy's" anyway.

I know a few sites where something like

||domain.com/img/
@@||domain.com/img/*abc.gif

would be needed and it seems like the new option would take care of that with 1 rule and without the need for whitelist that can't be overridden BUT those are all anti-adblock actions and those sites would simply find another way to make it hard for us if we added that rule.

My vote goes for the already carried-out rejection. :-)
Some general comments from me: I think that I should stop adding filter syntax extensions as much as possible. The syntax is already pretty complicated and it makes sense not to make it any worse. In future there should only be an exception for syntax extensions that clearly benefit many. Syntax extensions for rare and obscure cases will definitely not be implemented.