Filter by Tagname

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Tahattmeruh

Filter by Tagname

Post by Tahattmeruh »

http://www.heise.de/newsticker/
They start to show ads only as text because everything else is blocked.

e.g.
http://www.heise.de/newsticker/meldung/68131

The whole add is surrounded by a <cadv> tag.
It would be great if I could tell adblock to block everything in special tags.

Tahattmeruh
Guest

Post by Guest »

Use RIP.
Tahattmeruh

Post by Tahattmeruh »

But RIP cannot remote custom tags. I have tried it and I could get an answer for that. The same syntax for DIV tags works, but not for custom tags.
User avatar
mcm
Posts: 359
Joined: Sat Jun 10, 2006 2:36 am

Post by mcm »

Type "about:config" into the location bar (where you type web addresses). Then type "adblock" into the filter field. Change the "adblock.elemtypes" preference to "//div|//cadv". Adblock will now list CADV elements as well as DIV to be blocked. However, Adblock relies on there being an ID or CLASS attribute on the tag otherwise there is no way to uniquely identify it and won't be listed. Example:

<cadv id="ad"></cadv>

RIP is certainly another track to try as the elements are uniquely identified by their location, but of course if the location of the ad is changed then it will no longer be blocked.
Guest

Post by Guest »

Good to know. Thx for that answer.
The tags have no ID or CLASS attribute.
I want to filter them all so it doesn't matter if they are unique or not.
User avatar
mcm
Posts: 359
Joined: Sat Jun 10, 2006 2:36 am

Post by mcm »

Ok here are instructions to list elements without an ID or CLASS name.
  1. Download latest xpi file.
  2. Rename file extension to ".zip" and extract.
  3. Rename file extension of "adblock.jar" under the chrome directory and extract.
  4. Open "chrome\adblock\content\component.js" in a text editor like notepad.
  5. Use the search to find and remove this line "if (elem.id=="" && elem.className=="") continue;"
  6. Repackage back into an xpi file and install.
This will now list elements without an ID or CLASS allowing you to block them.
Guest

Post by Guest »

This would work if the tag is a DIV tag. But they use custom tags like CADV and BCADV. Adblock doesn't list them.
User avatar
mcm
Posts: 359
Joined: Sat Jun 10, 2006 2:36 am

Post by mcm »

If you follow my first post Adblock should list them, change the preference to "//div|//cadv|//bcadv" to include bcadv tags as well. If you want to list everything then change the preference mentioned to "//*" but of course that markedly slows down the browser.

Edit
Well I just looked at the source code for the page (http://www.heise.de/newsticker/meldung/68131) and I don't see any ads contained within the <cadv></cadv> tags. These are the ads I see on the page and how to remove them. All of which are blocking elements that have identifiers and don't require editing component.js.

Image ads
Blocked with /\Wads?\W/ filter.

DIV ad at the bottom
Enable "Check DIV Elements" and change the /Wads?\W/ filter to /\Wads?(bottom)?[\W_]/

DIV ad in the middle of the article
Add http://www.heise.de/newsticker/*#DIV(bmc_content) filter.

Online market ad bottom of left hand column
Change "adblock.elemtypes" preference to "//div|//table|//h4" and add http://www.heise.de/newsticker/*#*kasten_markt
filter.
User avatar
mcm
Posts: 359
Joined: Sat Jun 10, 2006 2:36 am

Post by mcm »

To summarize here's the full list of steps to remove the ads on the http://www.heise.de/newsticker/meldung/68131 page.
  1. Type about:config into the location bar and hit enter.
  2. In the Filter: field type adblock.
  3. Double click on adblock.elemtypes.
  4. Enter the value //div|//table|//span
  5. Add the following filters to your filter set:

    Code: Select all

    /\Wads?(bottom)?[\W_]/
    http://www.heise.de/newsticker/*#DIV(bmc_content)
    http://www.heise.de/newsticker/*#*kasten_markt
From now on Adblock will list TABLE and SPAN elements which are commonly used by adverts. I probably wouldn't recommend adding H4 elements to remove the Online Market header as they don't tend to be used by ads and the least number of elements to detect for the better as that will mean faster browsing.
Post Reply