Block div containing text/link?

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
her34
Posts: 6
Joined: Thu Apr 23, 2009 5:55 pm

Block div containing text/link?

Post by her34 »

Is it possible to block an element based on text contained within it?

For example on this website:
http://videosift.com/

I'd like to block certain types of videos.

This rule:

Code: Select all

videosift.com##DIV.sift
blocks all of them which is too much.


So if i got sick of charlie sheen videos i wish i could put something like

Code: Select all

videosift.com##DIV.sift//a[(text()="charlie sheen")]
Ares2
Posts: 1275
Joined: Fri Feb 15, 2008 12:47 pm

Re: Block div containing text/link?

Post by Ares2 »

her34 wrote:Is it possible to block an element based on text contained within it?
Unfortunately, that's not possible with Adblock Plus.
LorenzoC

Re: Block div containing text/link?

Post by LorenzoC »

In ABP you have two kind of rules.

Blocking rules aim the URL of external objects. Like the site loads a banner from the adserver "ad.example.com" and the rule will be something like ||example.com^ or .example. Anything that comes from an URL containing the keyword ".example." will be blocked.

Element Hiding rules aim to HTML elements using CSS selectors or inheritance. Like your videosift.com##DIV.sift rule above. This rule DOES NOT BLOCK, it hides all the DIVs whose CLASS is "sift", by changing their CSS "display" property.
Locked