[Done] EHH should detect if a whole class name is removed

Various discussions related to Adblock Plus development

[Done] EHH should detect if a whole class name is removed

Postby famlam » Sat Aug 07, 2010 2:26 pm

Just a simple example, it is no ad, but the real example was on a Dutch site and I won't bother you with languages you probably don't know
Say you are on http://www.bbc.co.uk/ and you 'really' would like to block the brown boxes below each column header.

Their class is "title noSummary themeBgColour"

This results in the EHH suggesting
bbc.co.uk##DIV.title.noSummary.themeBgColour

But what if you would like to block class "title"?
The EHH suggests
bbc.co.uk##DIV[class^="title"]

However, my request is to let it suggest
bbc.co.uk##DIV.title

or more general:
if you modify the class field in the EHH and you remove a full class then it should still show the element.class1.class2 syntax, rather than suggesting element[class^="class1 class2"]


Or maybe a better example:
You again have
bbc.co.uk##DIV.title.noSummary.themeBgColour
but you really don't want noSummary in the selector.
So you remove it. Now the css selector SHOULD be
bbc.co.uk##DIV.title.themeBgColour or eventually bbc.co.uk##DIV[class^="title"][class$="themeBgColour"]
but it shows the (invalid) filter
bbc.co.uk##DIV[class*="title themeBgColour"]


(p.s.: the real example which made me report this is that I wanted to block the divs with class "teaser-component-inner border" on "http://www.metronieuws.nl/". But of course the 'border' class doesn't need to be in the selector... so I removed it and was wondered about the EHH suggesting a [class^="..."] filter instead of a .class filter. But as said before, I wouldn't bother you with a Dutch list. I can read it (otherwise I couldn't maintain a Dutch filter list), but I guess you can't)
(p.p.s.: I used 'green' as the 'best' filter, blue as the current filter, which isn't perfect and red as broken filter...)
famlam
 
Posts: 59
Joined: Sat Aug 07, 2010 2:06 pm

Re: Request: EHH should detect if a whole class name is removed

Postby Wladimir Palant » Tue Aug 17, 2010 9:38 am

I think EHH should allow to select individual classes in addition to being able to hide by attribute. Same should go for id attribute. So if we have <div id="foo" class="bar bas"> the suggestions should be:

Tag name: DIV (not editable, not checked by default)
ID: foo (not editable, checked by default, adds "#foo")
Class: bar (not editable, only checked by default if no ID, adds ".bar")
Class: bas (not editable, only checked by default if no ID, adds ".bas")
id: foo (editable, not checked by default, creates rules like [id="foo"])
class: bar bas (editable, not checked by default, creates rules like [class="bar bas"])

Invalid ID and class values should be considered here and only allow hiding by attribute (this is already on the roadmap and was discussed in viewtopic.php?t=5682). The only problem is user confusion when the same attribute can be used in different ways.

Moved to Future development.
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: [Roadmap] EHH should detect if a whole class name is removed

Postby Wladimir Palant » Tue Aug 17, 2010 9:43 am

Added to EHH 1.1 roadmap (tentatively).
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: [Roadmap] EHH should detect if a whole class name is removed

Postby Wladimir Palant » Tue Oct 26, 2010 12:03 pm

Heh, I didn't realize that the proposed solution here requires string changes - we are past string freeze for EHH 1.1 so this can no longer be implemented. Maybe this can be solved differently...
Wladimir Palant
ABP Developer
 
Posts: 8395
Joined: Fri Jun 09, 2006 6:59 pm
Location: Cologne, Germany

Re: [Roadmap] EHH should detect if a whole class name is removed

Postby Wladimir Palant » Tue Oct 26, 2010 12:39 pm

Turned out this is already working in the current development builds - one only needs to remove the "unnecessary" classes from the text field.
Wladimir Palant
ABP Developer
 
Posts: 8395
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 2 guests