Stubborn frame...

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

Stubborn frame...

Post by Tuljac »

I am trying to block this advertising frame which contain links. Here is screenshot; frame is marked with red arrow:

Image

It's located at this site - http://www.blog.hr

Please, can someone help me to make filter for that?
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

I can't see the ad you mentioned on that page even with ABP disabled. However, all the ads I (as some who doesn't speak the language) can see are blocked by this filter:

Code: Select all

|http://ads.
Tuljac

Post by Tuljac »

That ad is located at the middle of right side. If you can't find it, go to "Edit" , "Find In This Page" ,and then type "spon".

Here is source code, just in case:

Code: Select all

<tr>
<td colspan="3">
<table cellspacing="0" cellpadding="0" style="font-family:arial, helvetica;margin-top:3px;">
<tr>
<td style="border-top: 1px solid #E1D4C0;border-right:1px solid #E1D4C0;border-left: 1px solid #E1D4C0;padding:3px 6px 1px 6px;font-size:13px;width:179px;">
<div style="font-family:arial, helvetica;color:#6F6F6F;font-size:13px;x;margin-bottom:0px;"><center>Sponzorirani linkovi</center></div>
<!--LINK ADS-->
</td>
</tr>

</table>
</td>
</tr>

<tr>
<td colspan="3">
<table cellspacing="0" cellpadding="0" style="font-family:arial, helvetica;">
<tr>
<td style="border-right: 1px solid #E1D4C0;border-left:1px solid #E1D4C0;padding:5px 6px 1px 6px;font-size:13px;">
<a href="http://www.monitor.hr/jump.php?url=www.almahor.com" target="_blank"><b>Almahor Studio</b></a><br>
Kvalitetna dizajnerska rješenja za Internet.<br>
<font color="#008000">www.almahor.com</font>
</td>
</tr>

</table>
</td>
</tr>

<tr>
<td colspan="3">
<table cellspacing="0" cellpadding="0" style="font-family:arial, helvetica;margin-bottom:2px;">
<tr>
<td style="border-right: 1px solid #E1D4C0;border-left:1px solid #E1D4C0;border-bottom: 1px solid #E1D4C0;padding:5px 6px 4px 6px;font-size:13px;">
<a href="http://www.monitor.hr/jump.php?url=www.bankamagazine.hr/informacije/o-newsletteru" target="_blank"><b>Banka magazine</b></a><br>
Besplatne dnevne poslovne novosti na vaš e-mail.<br>
<font color="#008000">www.banka.hr</font>
</td>
</tr>

</table>
</td>
</tr>
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

ah, I've found it, sorry.

Blocking this eith abp is somewhere between impossible and really hard. It's not a frame, or an image, and the html elements used do not have any useful identifiers that could be used to block the right ads and leave the rest alone. You could use use element hiding rules to block the 26th, 27th and 28th row of any table, but there are other tables with as many rows. Finding the right table would be about as complex making the rules utterly complex and only the slightest change to the source of the page 'd make the rules in the best case useless, in the worst they'd block content.
Tuljac

Post by Tuljac »

Dr. Evil wrote:ah, I've found it, sorry.

Blocking this eith abp is somewhere between impossible and really hard. It's not a frame, or an image, and the html elements used do not have any useful identifiers that could be used to block the right ads and leave the rest alone. You could use use element hiding rules to block the 26th, 27th and 28th row of any table, but there are other tables with as many rows. Finding the right table would be about as complex making the rules utterly complex and only the slightest change to the source of the page 'd make the rules in the best case useless, in the worst they'd block content.
In other words, there is no way to block that?? :( :cry:
User avatar
Stupid Head
Posts: 214
Joined: Sat Aug 26, 2006 8:11 pm
Location: USA

Post by Stupid Head »

Code: Select all

blog.hr##td[colspan="3"]:not([valign])>table
Tuljac

Post by Tuljac »

Stupid Head wrote:

Code: Select all

blog.hr##td[colspan="3"]:not([valign])>table
Thank you very much!!!! It works perfectly!! :D
Tuljac

Post by Tuljac »

Tuljac wrote:
Stupid Head wrote:

Code: Select all

blog.hr##td[colspan="3"]:not([valign])>table
Thank you very much!!!! It works perfectly!! :D
Now I want to know what that filter exactly does. Can someone explain how it works? Please...
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Great job, Stu! :D

So glad that you work with me. Your element skills are as good as Sheepy's. 8)

@Tuljac:
I'd like to hear this 'hide' myself. I think I'm creating a monster. The man has some skills. :lol:

Edit: I pretty much understand the 'hide' ... it's the syntax that I've never seen used in ADP before that has me curious .... ":not" ? ... didn't know you could do that.
User avatar
Stupid Head
Posts: 214
Joined: Sat Aug 26, 2006 8:11 pm
Location: USA

Post by Stupid Head »

The filter is actually a CSS selector. It matches a table element that is a child of a td element that has a colspan of 3 but doesn't have a valign attribute. It's confusing if you don't try it yourself.

Documentation on using CSS selectors in Adblock Plus

CSS selectors tutorial (only covers CSS 2.1, there are some CSS 3 selectors that Gecko supports and are useful)

Firebug (easily identify elements without looking at source code)

Not() is a CSS 3 selector that Gecko supports. There are quite a few that are supported.
User avatar
rick752
Posts: 2709
Joined: Fri Jun 09, 2006 7:59 pm
Location: New York USA
Contact:

Post by rick752 »

Thanx, Stu :D

And "yes", Firebug is great for element identifications within the code.

ps: @ Stu - There was a Firebug update yesterday.
User avatar
Tadiew
Posts: 7
Joined: Fri Oct 27, 2006 10:35 pm
Location: San Francisco, CA

Similar code to hide unblockable element on eweek site?

Post by Tadiew »

Stupid Head wrote:

Code: Select all

blog.hr##td[colspan="3"]:not([valign])>table
Can something like this be used to block the large, grey square Advertisement box eweek shows with all (I think) of the other ad-type objects blocked?

Here's a sample page:

http://www.eweek.com/article2/0,1895,20 ... 102706EOAD

I just noticed that there's also a bar of whitespace across the top where most likely a banner ad has been hidden.

I switched to FF 2.0 a couple of days ago and Adblock Plus (and the Filterset.G Updater add-on) came along w/o problems as far as I can tell.

I'm sadly deficient in knowing where and how to place fixes like the one quoted above, so if there is a fix for the eweek element, please let me know where to put it (roflmao!) as well. Thanks!
User avatar
Stupid Head
Posts: 214
Joined: Sat Aug 26, 2006 8:11 pm
Location: USA

Post by Stupid Head »

Switch from Filterset.G to EasyList + EasyElement. Those two filter subscriptions will remove advertisements and the leftover elements you speak of. It's highly recommended, and you won't need a separate extension like Filterset.G Updater to keep the filters up to date.
What, me worry?
Dr. Evil
Posts: 194
Joined: Fri Sep 08, 2006 3:51 pm

Post by Dr. Evil »

Code: Select all

eweek.com##td.Article_Content > div[style*="float"]
Besides, you really shouldn't use Filterset.G it's been unmaintained for quite some time now and it uses slow regexps and there are lots of false negatives. Try one of the subscriptions abp suggests in its preferences instead.
IceDogg
Posts: 909
Joined: Fri Jun 09, 2006 11:22 pm

Post by IceDogg »

Dr. I agree with you except that G is working on it some again. But I still say Rick's is the better one. IMHO
Locked