Proxomitron Filters - Discussions welcome > Spam Blockers

Kill ad tables

(1/3) > >>

Jor:
I'm tired of seeing tables filled with ad links... they're more and more common at image galleries. This filter removes the entire content of a <td> or <th> if it contains an ad link. I've been tweaking this filter all day, and think it's now finally useful (as in it does not trigger too often on pages it shouldn't). Should you encounter pages that mix ad content with actual content inside one element, just place them in the SkipTables blocklist, and this filter will leave that page alone.Name = "Kill ad tables"
Active = TRUE
URL = "(^$LST(SkipTables))"
Bounds = "$NEST(<th*,*,</th>)|$NEST(<td*,*,</td>)"
Limit = 2048
Match = "(*href=$AV(*://($LST(AdList))1*)*)>*</a*"
Replace = "<span class="prox" kill="Ad Table" detail="1" reason="9"></span>" If you edit your prox.css to comment out the pseudo-classes .prox:before and .prox:after, the ad tables will completely disappear

Check the "Other" forum for my current prox.css

Edited by - Jor on 26 Apr 2002  15:41:24

Jor:
This filter might corrupt page layout, improved version below:
Name = "Kill ad tables"
Active = TRUE
URL = "(^$LST(SkipTables))"
Bounds = "$NEST(<th,</th>)|$NEST(<td,</td>)"
Limit = 2048
Match = "<t(h|d)(*)1>(*href=$AV(*://($LST(AdList))2*)*)>*</a*"
Replace = "<td1><span class="prox" kill="Ad Table" detail="2" reason="9"></span></td>"

 

JD5000:
Great work Jor! This works great.

--------

"Imagination is more important than knowledge" - Einstein

Jor:
Small alteration:Name = "Kill ad tables"
Active = TRUE
URL = "(^$LST(SkipTables))"
Bounds = "$NEST(<th,</th>)|$NEST(<td,</td>)"
Limit = 2048
Match = "<t(h|d) (*2)>(*href=$AV(*://($LST(AdList))1*)*)>*</a*"
Replace = "<td class="proxtable" 2><span kill="Ad Table" detail="1" reason="9"></span></td>"
Also create this entry in your prox.css:.proxtable
{
  display: none !important;
}
Now the table layout will be preserved (important if colspan or rowspan is used), but the cell itself will be hidden completely :)

 

JD5000:
This version causes my CPU to go through the roof, which in turn, causes slower page loads.


EXAMPLE:http://www.pcnineoneone.com/cgi-bin/dcforum/dcboard.cgi?az=list&forum=computer&mm=0&archive=

--------

"Imagination is more important than knowledge" - Einstein

Navigation

[0] Message Index

[#] Next page

Go to full version