Block Paragraph ?

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
ptosch
Posts: 4
Joined: Thu Jan 16, 2014 1:09 pm

Block Paragraph ?

Post by ptosch »

Hello,

I have a the following html source:

<p>Text which should be readable. </p>
<p>Adsite: <a href="https://www.adsite.com/index.php/TheBook/">&#8220;The Book&#8221;</a> &#8211; Buy this book .</p>

Opening it in the Browser following appears:

Text which should be readable.

Adsite: “The Book” – Buy this book .


Now I would like to filter out the second line. The rule should be: If finding a paragraph containing the Word "Adsite", dont show the paragraph containing this word.

How could one realize this ?

Regards,
Peter
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Block Paragraph ?

Post by mapx »

try

Code: Select all

##a[href*="adsite"]
based on site name
ptosch
Posts: 4
Joined: Thu Jan 16, 2014 1:09 pm

Re: Block Paragraph ?

Post by ptosch »

Unfortunately I didnt click on "Do not automatically parse URLs", so the source was not entirely visibile.

This is how it should look like:

Code: Select all

<p>Text which should be readable. </p>
<p>Adsite: <a href="https://www.ewrtw.com/index.php/TheBook/">&#8220;The Book&#8221;</a> &#8211; Buy this book .</p>
Anyway, ##a[href*="adsite"] did not work.

Do You have another idea ?

Regards,
Peter
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Block Paragraph ?

Post by mapx »

well, I already said, it's based on the ...name of the site (you can not use the text adsite)

use

Code: Select all

##a[href*="ewrtw.com"]
or

Code: Select all

##a[href*="/TheBook"]
ptosch
Posts: 4
Joined: Thu Jan 16, 2014 1:09 pm

Re: Block Paragraph ?

Post by ptosch »

Thanks, but now only the Link disappears, I wanted to disappear the whole paragraph in which the link is embedded.

This is how it looks now:

Text which should be readable.

Adsite: – Buy this book .


So the last line shouldnt appear.

Regards,
Peter

ps: so one cannot filter by some text, only by links ?
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Block Paragraph ?

Post by mapx »

you can filter using the css elements names (div, class, href, ..)
en/filters#elemhide

which is the website / page ?
ptosch
Posts: 4
Joined: Thu Jan 16, 2014 1:09 pm

Re: Block Paragraph ?

Post by ptosch »

Oh, it is a german site: http://www.lawblog.de/

If You search for the word "Werbeeinblendung" You find the line I want to disappear:
"Werbeeinblendung: “Alles, was Unrecht ist” – das Buch zum Blog. Jetzt im Buchladen oder als E-Book.

Bye,
Peter
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: Block Paragraph ?

Post by mapx »

nothing to do using ABP

however is possible using/writing some userscript (inside greasemonkey or scriptish)
User avatar
Gingerbread Man
Posts: 1339
Joined: Fri Aug 12, 2011 5:28 am

Re: Block Paragraph ?

Post by Gingerbread Man »

ptosch wrote:the line I want to disappear:
"Werbeeinblendung: “Alles, was Unrecht ist” – das Buch zum Blog. Jetzt im Buchladen oder als E-Book.
Is that line unique? I don't see it turning up more than once on the page. If it is indeed unique, you can hide it with this filter. Otherwise, please post links to pages where it shows up again.

Code: Select all

lawblog.de###post-27589 p:nth-last-child(-n+2):not(:last-of-type)
Element hiding rules are composed of the domain name (optional), ## to mark the filter as an element hiding rule, then a CSS selector.
https://developer.mozilla.org/en-US/doc ... /Selectors
LisaLisa
Posts: 17
Joined: Tue Jul 07, 2020 11:59 pm

Re: Block Paragraph ?

Post by LisaLisa »

I do not understand
Post Reply