Block element based on content

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Jack B.

Block element based on content

Post by Jack B. »

How can one block an element based on its content? I would think one could use the following to block a DIV element that contain "phrase," but what if one wanted to use a wildcard around "phrase"?

Code: Select all

 ##div[content="phrase"]
LorenzoC

Re: Block element based on content

Post by LorenzoC »

If I understood ABP and Element Hiding Helper correctly, the rules working on CSS properties of HTML elements DO NOT block, they HIDE.
It means the <div> in question is not displayed but whatever it contents will be downloaded the same.
If you want to actually block something, it must be a file that is retrieved from some URL.

Example:

Code: Select all

<div id="ads"><img="http:/www.example.com/images/example.jpg" /></div>
Pointing the <div> via its ID you will hide the image, pointing the image url you will block the image from downloading.
Locked