filter question

General information, announcements and questions about the EasyList subscriptions.
Locked
amosmos
Guest

filter question

Post by amosmos »

is it possible to filter links based on their "href" attribute?

thanks,
amos
Ares2 Verified
Emeritus Contributor
Emeritus Contributor
Posts: 4572
Joined: Thu Sep 27, 2007 12:49 pm

Post by Ares2 Verified »

You can hide them with something like:

Code: Select all

site.com#a(href=http://www.badlink.com/a.html)
or more general

Code: Select all

site.com#a(href*=.badlink.com/)
Rules like this and all other kind of hiding rules can be easily created with the Element Hiding Helper.
amosmos
Guest

Post by amosmos »

Thanks!

and is there a way to hide the parent of those links?

there is a site with a bunch of ads links inside a table, and i want to hide the entire table, is that possible?
Ares2 Verified
Emeritus Contributor
Emeritus Contributor
Posts: 4572
Joined: Thu Sep 27, 2007 12:49 pm

Post by Ares2 Verified »

No, it only works vice versa (=hide a child node based on its parent). But there might still be a chance to hide that table with CSS selectors. If you you give me an example page, I can see if it's possible and explain it to you.
amosmos
Guest

Post by amosmos »

if you look for example here: http://sports.walla.co.il/

you will see at the bottom of the most right column a table full with ads. i know you don't read hebrew so just look for a table title that reads: מדור פרסומי.

here is another explanation how to find it: it is a table, and the only html element inside a div which is also the only html element inside the last TD in that right column.
Ares2 Verified
Emeritus Contributor
Emeritus Contributor
Posts: 4572
Joined: Thu Sep 27, 2007 12:49 pm

Post by Ares2 Verified »

amosmos wrote:i know you don't read hebrew
How do you know that for sure? It's true though. ;-)

I guess you already know the Element Hiding Helper I mentioned in my last post? Just start it, hover over the element you want to hide ( you may need to use "w" (wider) and "n" (narrow) respectively the keys that show up in the yellow help box if you use the hebrew version of Adblock Plus) and click on it.

[img removed]

A window pops up, suggesting you a rule. In you particular example, this one should already be good enough (you can check the effect by checking and unchecking "Preview".

[img removed]

If on some sites the suggested rule doesn't have the desired effect (e.g. hides too much), you should first try to check more attributes ("align: center" for the example page) if that still doesn't work, you might want to use the advanced view and use parent items or pseudo classed like :last-child to define the element you want to hide.

[imgs removed]

It first sounds a bit complicated but once you get used to it, you will be able to hide pretty much everything you want this way. ;-)
amosmos
Guest

Post by amosmos »

Thanks!

indeed i started using EHH and it awesome.

i am just upset that some sites don't give their ads element a unique id or class which makes it easy to hide.

i am afraid to hide too much, especially because i am trying to find filters that can go on the easy list.

Thanks again!
User avatar
rick752
Honorary Member
Honorary Member
Posts: 4508
Joined: Fri Dec 30, 2005 1:02 am
Location: New York, USA

Post by rick752 »

Whoa, be careful anonymous.

I do not add too much in the EasyList for specific non-English-language sites. The EasyList is mainly for English sites and general global advertisers. It would be nice if someone would make an Israeli supplement subscription though. I do not support a language I don't understand ... that is why others have created 'complimentary' subscriptions to use with the EasyList (none for Israel so far though, afaik)
"Experience is something you don't get until just after you need it"
Locked