Block a Div Container, depending on it's content

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

Block a Div Container, depending on it's content

Post by Twisted »

hi, i have some problems with blocking some elements on the german social network lokalisten.de.

there's some annoying boxes wich can't be disabled by the settings. the boxes are div's but the assigned classes are used by some functions i don't want to block. here's a code example:

Code: Select all

<div class="fixedBox">
	<div class="fixedBoxHeader">
			<h3>news by N24.de</h3>
	</div>
<div class="fixedBoxSub">
<p>
<a href="http://www.n24.de/ratgeberservice/newsletter/index.html" target="_blank" class="nlLink">newsletter kostenlos bestellen</a>
</p>
</div> 
<div class="rss">
<a href="http://feeds.n24.de/%7Er/N24-lokalisten/%7E3/zQ4EogqtS4o/newsitem_5261236.html" target="_blank"><img src="http://www.N24.de/media/_fotos/4sport/juli_13/090723_3/kl2_HOME_Standardteaser_Modul_Variante_01.jpg"></a>
	
Gegen die Hitze - 
"Blaumachen" und abtauchen
<br>
<a href="http://feeds.n24.de/%7Er/N24-lokalisten/%7E3/zQ4EogqtS4o/newsitem_5261236.html" class="rssLink" target="_blank">
		mehr...
</a>
<div class="clear"></div>
</div>
</div>
The DIV-ID "fixedBox" is used by many other functions i don't wanna block. How i can block this box on the condition that the "fixedBoxSub" child-div contains "n24.de" at the <a> tag?
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

do you have a link to the page you're talking about?
Twisted

Post by Twisted »

It's the start page if you login. (http://www.lokalisten.de/web/showHome.do)

I want to remove the "solltest du kennen" and "News by N24" box.

If you don't want to make an account, i can post more code if you request.
Twisted

Post by Twisted »

my problem isn't solved yet =/
MonztA
ABP Developer
Posts: 3957
Joined: Mon Aug 14, 2006 12:18 am
Location: Germany

Post by MonztA »

I created an account. For the n24 box: "lokalisten.de##DIV.fixedBox" works, but "lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBox" is safer. I don't get "Sollst Du kennen" here.
Twisted

Post by Twisted »

With this (lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBox) rule, the "solltest du kennen" div is also blocked, because it has "fixedbox" as class.

I don't know if the problem completely solved with this. i'll testing this rule.

Thanx for help :)
Twisted

Post by Twisted »

I've tested the rule and found the following problem:

The DIV "fixedBox" is used by other functions as a child of the "column1" DIV.

My solution is, to specify the rule like this:

Code: Select all

lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBox > DL.teaserList1
Depending on the code of the "solltest du kennen" DIV:

Code: Select all

<div class="fixedBox">

	<div class="fixedBoxHeader">
			<h3>solltest du kennen</h3>
	</div>

<div class="fixedBoxSub">
  <p class="more">
    <a href="/web/search/fastSearch.do?method=search&type=28">mehr...</a>

  </p>
</div> 

<div class="moveBoxCont1">
	 

		<dl class="teaserList1">
			<dt>
				...
			</dt>
			<dd>
				...
			</dd>					
		</dl>

    

		<dl class="teaserList1">
			<dt>
				...
			<dd>

				...
			</dd>					
		</dl>

    
    <div class="clear"></div>
</div> 
              

</div>
Unfortunately my rule doesn't work, maybe a syntax error... don't have many experience with css selectors.

Please help :?
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

this should to do the trick (but I didn't test, only looked at the html snippet you provided):

lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBox DL.teaserList1
Twisted

Post by Twisted »

yeah it works fine.

the content from the DL tags is hidden now. the only things that remains are the fixedBoxHeader and fixedBoxSub DIV's. is there any way to block these DIV's? a condition would be nice like this:

if exist "lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBox DL.teaserList1"
block"lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBoxSub" and "lokalisten.de##DIV#column1[style="position: relative;"] > DIV.fixedBoxHeader"
Locked