[Done] Better filter composer suggestions?

Various discussions related to Adblock Plus development

[Done] Better filter composer suggestions?

Postby Wladimir Palant » Wed Jun 23, 2010 7:38 am

In viewtopic.php?f=1&t=5713 Michael suggests that the filter composer always removes the protocol part of the address - so the default suggestion would be "||example.com/foo/bar/" rather than "|http://example.com/foo/bar/". Of course the new suggestion will also block "https://example.com/foo/bar/" and "http://test.example.com/foo/bar/". What do you think, is this a good idea, especially given that the filter composer is supposed to aid less experienced users?

The other suggestion was to drop the asterisk at the end of the filter. Technically, this asterisk is unnecessary, the filter composer won't ever produce regular expressions even without it. However, it might be a simple example of asterisk use for those who are still learning. Again, what do other people think?
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: Better filter composer suggestions?

Postby maybee » Wed Jun 23, 2010 9:03 am

I think it' good idea about remove protocol by default.
because many filter maintainers don't use patterns with prefix |http://. so they don't dependent on selecting suggested patterns and just might write filters by the custom pattern.

Now
Image

a suggested form
Image

1. remove redundant patterns.
e.g. remove hani.co.kr/*
Code: Select all
hani.co.kr/*
hani.co.kr^

and remove the pattern of full address. because If just select custom pattern, you can select the complete pattern.

2. remove wildcard character at the end of patterns.
before
Code: Select all
hani.co.kr/section-adv/09/if/*
hani.co.kr/*

after
Code: Select all
hani.co.kr/section-adv/09/if/
hani.co.kr/


because it is confusing to use wildcard characters. somebody might think wildcard characters shoud be added to the end of patterns.

Usually Adblock Plus treats every filter as if it had a wildcard at its beginning and end, e.g. there is not difference between the filters ad and *ad*.


3. subdivide pattern by directory more.
first directory
hani.co.kr/section-adv/
second directory
hani.co.kr/section-adv/09/
..
last file name
hani.co.kr^*/ad_top_logo.html

especially last file name might show the fact the user can use wildcard character.

4. make a option to use hostname www. in the pattern
If the option is active, the patterns are shown like these :
Code: Select all
www.example.com/abc/efg/
www.example.com/abc/
www.exampl.com^


If the option is unactive, the patterns are shown like these :
Code: Select all
example.com/abc/efg/
example.com/abc/
exampl.com^
maybee
 
Posts: 130
Joined: Sun Jan 17, 2010 8:48 pm

Re: Better filter composer suggestions?

Postby Dr. Evil » Tue Jun 29, 2010 8:15 pm

I don't think anybody cares whether a file is loaded via http or https when blocking it. So I think this a correct change.

However, what I'd find more important is a warning when a custom filter doesn't match the URL it's supposed to block.

About the asterisk at the end: I've always used it, because it's clearer for people who don't know that ABP patterns can match any part of the URL. The asterisk sign (even if it's not necessary) tells everybody there might be some text following.
Dr. Evil
 
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Re: Better filter composer suggestions?

Postby Wladimir Palant » Tue Jun 29, 2010 8:56 pm

Ok, if nobody has additional arguments the conclusion seems to be that protocol is dropped from filter suggestions - all suggestions start immediately with the host/domain name. Under "custom" the protocol is still listed however and has to be removed manually (it is still the full unchanged address initially).

A warning for custom filters that don't match the URL is a good idea.

Asterisk at the end of the suggestion stays.
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: Better filter composer suggestions?

Postby Michael » Tue Jun 29, 2010 9:54 pm

I accept that the asterisk may be useful for new users, but I would request that there is an option (probably available through about:config) that would disable the automatic use of the character, as it would make filter generation quicker for subscription authors and other experienced users.
Michael
 
Posts: 1361
Joined: Sat Dec 19, 2009 1:29 pm

Re: Better filter composer suggestions?

Postby Wladimir Palant » Wed Jun 30, 2010 12:38 pm

As a subscription author you can also modify your pre-upload script to remove these asterisks (enforcing common style for your filter list) - since you are using a script anyway... Experienced users on the other hand have no reason to care about the asterisk. I'm not really into introducing new options for everything you might ever need in life.
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: [Roadmap] Better filter composer suggestions?

Postby Wladimir Palant » Thu Sep 30, 2010 9:29 am

This is simple enough to make Adblock Plus 1.3, added to the roadmap.
Wladimir Palant
ABP Developer
 
Posts: 8398
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany



Return to Adblock Plus development

Who is online

Users browsing this forum: No registered users and 0 guests