You are not logged in.

#1 2004-12-04 21:03:45

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

great firefox adblocking support through CSS

http://www.mozilla.org/support/firefox/adblock.html

in userContent.css:

/* Block Ads v.2004-06-12 by Neil Jenkins
   Portions of this ruleset are derived from the ad blocking css by Joe Francis at:
   http://www.floppymoose.com/
   Some code also contributed by Mike Hokenson:
   http://www.gozer.org/mozilla/ad_blocking
*/

iframe[width="120"][height="600"], a img[width="120"][height="600"],
iframe[width="125"][height="600"], a img[width="125"][height="600"],
iframe[width="150"][height="100"], a img[width="150"][height="100"],
iframe[width="150"][height="600"], a img[width="150"][height="600"],
iframe[width="160"][height="600"], a img[width="160"][height="600"],
iframe[width="300"][height="250"], a img[width="300"][height="250"],
iframe[width="336"][height="280"], a img[width="336"][height="280"],
iframe[width="468"][height="60"],  a img[width="468"][height="60"],
iframe[width="470"][height="62"],  a img[width="470"][height="62"],
iframe[width="728"][height="90"],  a img[width="728"][height="90"],
iframe[width="730"][height="92"],  a img[width="730"][height="92"],
iframe[width="600"][height="120"], object[width="125"][height="300"],
iframe[width="180"][height="150"],
iframe[src*="/ad-"],
iframe[src*="/ad."],
iframe[src*="/ad/"],
iframe[src*="/ad_"],
iframe[src*="/adframe"],
iframe[src*="/ads"],
iframe[src*="/adv"],
iframe[src*="/adx"],
iframe[src*=".ad"],
iframe[src*="_Banner"],
iframe[src*="BET365"],
iframe[src*="/click"],
iframe[src*="?click"],
iframe[src*="googlesyndication"],
iframe[src*="promos"],
iframe[name="bsadframe"],
iframe[id="adFrame"],
iframe[id="splashFrame"],
img[src*="/ad-"],
img[src*="/ad."],
img[src*="/ad/"],
img[src*="/ad_"],
img[src*="/ads"],
img[src*="/adv"],
img[src*="/adx"],
img[src*=".ad"],
img[src*="_ad_"],
img[src*="/click"],
img[src*="?click"],
img[src*="Editorial_Promos"],
img[src*="/toms_skyscraper_"],
img[src$="images/logos/amazon_international.gif"],
img[src*="freshmeat.net/button.gif"],
img[src*="pic.geocities.com/images/"],
img[src*="i.imdb.com/Vpics/"],
img[src*="i.imdb.com/Photos/CMSIcons"],
img[src*="i.imdb.com/Icons/apix/"],
img[src*="i.imdb.com/Icons/kpix/"],
img[src*="i.imdb.com/apix/"],
img[src*="sportsbybrooks.com/farkbutton.gif"],
img[alt*="advert"],
img[alt*="Click Here To Visit Our Sponsor"],
img[alt*="Sponsored Links"],
img[name="fixedSpImg"],
a:link[href*="/ad-"] img,
a:link[href*="/ad."] img,
a:link[href*="/ad/"] img,
a:link[href*="/ad_"] img,
a:link[href*="/ads"] img,
a:link[href*="/adv"] img,
a:link[href*="/adx"] img,
a:link[href*=".ad"] img,
a:link[href*="/banner"] img,
a:link[href*="/click.cgi"] img,
a:link[href*="/clickcgi?"] img,
a:link[href*="/clickover"] img,
a:link[href*="/clickthr"] img,
a:link[href*="/click-"] img,
a:link[href*="=click"] img,
a:link[href*="?click"] img,
a:link[href*="/A="] img,
table table table[width="346"][height="280"],
table[class="metatable"],
table[id="RefAd"],
table[cellspacing="0"][width="160"][height="329"][bgcolor="#000000"],
table[cellpadding="5"][width="150"][style="border: 1px dashed rgb(221, 170, 170); background-color: rgb(236, 248, 255);"],
table[border="0"][height="600"][width="120"],
table[height="90"][cellspacing="0"][cellpadding="0"][width="728"][border="0"],
table[border="0"][cellpadding="3"][cellspacing="0"][height="40"][width="100%"],
table[border="0"][cellpadding="0"][cellspacing="4"][align="right"][width="20%"],
table[border="2"] td[valign="top"][bgcolor="#ffffff"] table[width="138"],
table[border="0"][cellpadding="1"][cellspacing="0"][width="626"][bgcolor="#6699cc"],
table[bordercolor="red"][height="225"][cellspacing="0"][cellpadding="0"][width="190"][bgcolor="white"][border="0"],
table[width="336"][border="0"][cellspacing="0"][cellpadding="0"][align="right"][style="margin-left: 10px; margin-bottom: 10px;"],
table[width="770"][border="0"] tr[valign="top"]
td[width="160"],
td[class="cnnNavAd"],
td[class="RHBarBody"],
td[class="sl-table"],
td[style="border-bottom: 1px solid rgb(204, 204, 204); padding: 7px 3px; background-color: rgb(255, 254, 249);"],
td span[class="aoltextad"],
form[name="frmLargeForm"],
form[action*="click_lx.cgi"],
form[action^="http://rd.yahoo.com/"],
form[action=""][name$="SoapCity"],
form[action=""][name^="728x90"],
form[action=""][name^="300x250"],
form[method="get"][action*="martindale"][name="MDH"],
embed[type="application/x-shockwave-flash"][src*="_Banner"],
embed[type="application/x-shockwave-flash"][src*="/ad"],
embed[type="application/x-shockwave-flash"][href*="/ad"],
embed[type="application/x-shockwave-flash"][src*=".ad"],
embed[type="application/x-shockwave-flash"][href*=".ad"],
embed[type="application/x-shockwave-flash"][src*="?click"],
embed[type="application/x-shockwave-flash"][href*="?click"],
embed[type="application/x-shockwave-flash"][src*="/click"],
embed[type="application/x-shockwave-flash"][href*="/click"],
embed[type="application/x-shockwave-flash"][href*="promos"],
embed[type="application/x-shockwave-flash"][href*="=click"],
embed[type="application/x-shockwave-flash"][href*="redirect"],
embed[type="application/x-shockwave-flash"][href*="/A="],
embed[type="application/x-shockwave-flash"][name*="advert"],
embed[type="application/x-shockwave-flash"][name*="banner"],
embed[type="application/x-shockwave-flash"][width="728"][height="90"],
embed[type="application/x-shockwave-flash"][width="468"][height="60"],
embed[type="application/x-shockwave-flash"][width="467"][height="63"],
div[id="adstrip"],
div[id*="advert"],
div[id="dropin"],
div[id="dwindow"],
div[id="dcv_EchangeLay"],
div[id="mntl"],
div[id*="popup"],
div[id="quack"],
div[id="splashLayer"],
div[id*="sponsor"],
div[id="yschsec"],
div[class="ovt"],
div#contextualLinks,
div[style="border: 1px solid rgb(221, 221, 221); padding: 5px; background-color: rgb(255, 255, 255);"],
object[id="widgeth"],
*[class="ad"],
*[class*="eSext"],
*[name*="klipad"],
*[style*="/ads/"],
*[id*="popover_"],
*[src*="120x80"],
*[src*="140x"],
*[src*="?ad"],
*[src*="-ad-"],
*[src*="/adimage"],
*[src*="/adimg"],
*[src*="advert"],
*[src*="=click"],
*[src*="banners."],
*[src*="banner_ads"],
*[src*="/images/dinkus/more-arrow-lo.gif"],
*[src*="/javaImages/ec/"],
*[src*="/offer"],
*[src*="/puffboxes/"],
*[src*="/sponsors/"],
*[src*="_sponsor_"],
*[src*="/us.yimg.com/a/ya"],
*[src*=".adbutler.de"],
*[src*=".nedstatbasic.net"],
*[src*=".tradedoubler.com"],
*[src*=".travelocity./Sponsor_gifs/"],
*[src*="a.consumer.net"],
*[src*="bannermania.nom.pl"],
*[src*="cash4banner.com"],
*[src*="crazypopups.com"],
*[src*="hit-now.com"],
*[src*="hitbox.com"],
*[src*="img.thebugs.ws"],
*[src*="kinghost.com/ban/"],
*[src*="klipmart"],
*[src*="popupad.net/ats/"],
*[src*="public"][src*="ad"],
*[src*="/publicidad/"],
*[src*="qkimg.net"],
*[src*="qksrv.net"],
*[src*="rcm-images.amazon.com"],
*[src*="rcm.amazon.com"],
*[src*="salon.com/Creatives"],
*[src*="sexcounter."],
*[src*="sideads/"],
*[src*="statse.webtrendslive.com"],
*[href*="logging.to"],
*[href*="/referral/"],
*[href*="tryaol"],
*[href*="websponsors"],
*[src*="banman.asp"],
*[href*="banman.asp"],
*[src*="bannerman"],
*[href*="bannerman"],
*[src*="?banner"],
*[href*="?banner"],
*[src*="/banner/"],
*[href*="/banner/"],
*[src*="/jump/"],
*[href*="/jump/"],
*[src*="adfarm"],
*[href*="adfarm"],
*[src*="advertising.com"],
*[href*="advertising.com"],
*[src*="ar.atwola.com"],
*[href*="ar.atwola.com"],
*[src*="atdmt.com"],
*[href*="atdmt.com"],
*[src*="bluestreak.com"],
*[href*="bluestreak.com"],
*[src*="clickxchange.com"],
*[href*="clickxchange.com"],
*[src*="doubleclick"],
*[href*="doubleclick"],
*[src*="falkag.net"],
*[href*="falkag.net"],
*[src*="fastclick.com"],
*[href*="fastclick.com"],
*[src*="mediaplex"],
*[href*="mediaplex"],
*[src*="netdirect.nl"],
*[href*="netdirect.nl"],
*[src*="spinbox."],
*[href*="spinbox."],
*[src*="tradedoubler.com"],
*[href*="tradedoubler.com"],
*[src*="transfer.go"],
*[href*="transfer.go"],
*[src*=".tribalfusion"],
*[href*=".tribalfusion"],
*[src*="valueclick"],
*[href*="valueclick"],
*[src*="http://216.92.211.171/"],
*[href*="http://216.92.211.171/"],
*[src*="http://216.92.21.16/"],
*[href*="http://216.92.21.16/"] {
        display: none !important;
}

img[src*=".advance"],
img[src*="/click_"],
img[src*="/cnn/images/clickability/"],
img[src*="/logo2.m"],
img[src$="/banners/com000.jpg"],
a:link[href*=".add"] img,
a:link[href*="admin"] img,
a:link[href*="adobe"] img,
a:link[href*=".adp"] img,
a:link[href*="/advance"] img,
a:link[href*="click.mp3"] img,
a:link[href*="/imgres?imgurl="] img,
a:link[href*=":head"] img,
a:link[href*="http://nettracker."] img,
embed[type="application/x-shockwave-flash"][src*="gallery"] {
        display: inline !important;
}

Offline

#2 2005-01-04 19:36:34

skoal
Member
From: Frequent Flyer Underworld
Registered: 2004-03-23
Posts: 612
Website

Re: great firefox adblocking support through CSS

gold. pure gold...

Offline

#3 2005-02-01 06:42:30

sven
Member
Registered: 2005-02-01
Posts: 311

Re: great firefox adblocking support through CSS

These ad blocking css's are working with konqueror,  too. There you can select an alternate css file. But @import wont work with konqueror but it can be used with mozilla in the case you might want to separate site-specific filters from generic ones.

Here are some good examples of self-made filter that can be added to that css file:

/* --- news.com ------------------------------------------------------------- */

div#container div#savestories,
div#container div#content div#rightcol,
div#container div#content div#leftcol div#embed,
div#container div#content div#leftcol div#storywht,
div#container div#content div#leftcol div#newsletter,
div#container div#content div#leftcol div#datestamp,
div#container div#content div#leftcol div#story div#storyAddAlert,
div#container div#content div#leftcol img[src*="/highimpact"],
div#container div#content div#leftcol a img[src$="save.gif"],
div#container div#content div#leftcol iframe,
div#container div#content div#leftcol table {
    display: none !important
}

div#container div#content div#leftcol {
    width: 98% !important
}
/* --- slashdot.org --------------------------------------------------------- */

/*table[width="100%"][cellpadding="5"] table[align="center"][width="99%"] td[height="1"][width="230"][valign="top"][align="center"] center table[width="220"] td font[size="4"][face="arial,helvetica"] { display: none !important }*/

(the source: http://www.gozer.org/mozilla/ad_blocking/)

Both are looking great through these filters big_smile

These CSSs seem to be a good alternative for filtering software. In windows I used Proxomitron with jd5000 filter set (http://www.jd5000.net/) and it was pretty amaizingly effective.

Now there is opensource Proximodo (http://proximodo.sourceforge.net/) that should work with linux and be compatible with Proxomitron filters. It is made in windows using wxwidgets. It is an early beta and no one has made a linux compatible build/makefiles yet - not even the author.
Update: On the Proximodo forums there is a discussion on how people got proximodo to work in linux

Offline

#4 2005-03-09 16:06:18

MillTek
Member
Registered: 2005-01-30
Posts: 442

Re: great firefox adblocking support through CSS

I implemented the info in Phrakture's post above. It does a great job.  My question is this. How do I allow certain sites to operate.  I use

http://www.time.gov/timezone.cgi?Central/d/-6/java

to set and check times but the 'clock' will not operate since I installed the mods.


Any clues / assists????
Jim

Offline

#5 2005-03-09 20:19:29

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: great firefox adblocking support through CSS

Bloody brilliant. I've seen that elsewhere too... Yep, I love it.

Offline

#6 2005-03-10 11:09:57

pixel
Member
From: Living in the Server Room
Registered: 2005-02-21
Posts: 119

Re: great firefox adblocking support through CSS

Yeah, it's great, I hate those ads... This script is also very easy to tweak and add new entries....

but does anyone succeded in eliminating google text ads?


Favorite systems: ArchLinux, OpenBSD
"Yes, I love UNIX"

Offline

#7 2005-12-05 19:09:28

sven
Member
Registered: 2005-02-01
Posts: 311

Re: great firefox adblocking support through CSS

Now Proxomitron seems to work with the newest Wine! big_smile Even the icon appears in KDE menu.  Get also the jd5000 rules for really nice assortment of them. Download the .exe setup file and run it with wine. Then select the Proxo dir and your'e set! To start Proxomitron, just do 'wine Proxomitron.exe' and set browser's proxy to 127.0.0.1, port 8080. Then do CTRL-L and select the config file. There are three of the jd5000 configs - JD_Advanced, JD_Basic and JD_Extra. I usually use the advanced one because there I can select the "Dim white backgrounds" - filter. Those bright white backgrounds (e.g. Google) are just eye-burning.

The Proximodo project still doesn't have any Linux-ready source files. I tried to compile them, but got errors.

Offline

#8 2005-12-05 19:21:01

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: great firefox adblocking support through CSS

I use adblock with the Flterset.G updater (set to automatically update). It blocks Adwords too (usually). How is this better? (Besides the obvious difference of having to install extensions with my solution.)


·¬»· i am shadowhand, powered by webfaction

Offline

#9 2005-12-05 20:47:30

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: great firefox adblocking support through CSS

Yeah, Filterset.G Updater rocks. big_smile

Offline

#10 2006-03-29 10:34:42

sven
Member
Registered: 2005-02-01
Posts: 311

Re: great firefox adblocking support through CSS

I am using now Opera because Firefox seemed too slow. Its ad blocking capabilities are great, but I don't like the way menus lag and pages appear slow after I click on a link.

So the problem was that Opera doesn't have those ad blocking plugins. But I managed to solve this problem - I started to use good old Proxomitron again via Wine. The JD5000 - filterset has not been updated for a while, but now I found the forum thread, where there is discussion about managing the filterset again.  Grypen's filterset seems to work great, it even rewrites Google search results that allow some nice things like previewing the sites.

Offline

#11 2006-03-29 15:38:26

Romashka
Forum Fellow
Registered: 2005-12-07
Posts: 1,054

Re: great firefox adblocking support through CSS

So the problem was that Opera doesn't have those ad blocking plugins

Yes, Opera does not support plugins like Firefox (except Netscape plugins API). But Opera can do CSS-based ad blocking from version 7.
In version 9 (dev builds) there is even better ad-blocking built-in.
The only Firefox thing I miss in Opera is "Do not download images from external sites" (something like this, I don't remember exactly) - this very simple setting blocks all images from sites other than current.


to live is to die

Offline

#12 2006-03-29 15:41:36

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: great firefox adblocking support through CSS

There is also Privoxy if you need an adfiltering proxy that runs natively on Linux.

Offline

#13 2006-03-30 04:39:14

sven
Member
Registered: 2005-02-01
Posts: 311

Re: great firefox adblocking support through CSS

I tried Privoxy, too, but couldn't get the basic things to work properly - like removing the checkered image and freeing up the space ad banners take. Googling showed up some discussions but people got no proper answer to these questions. At Privoxy site the docs say that it is OK to have the used space in place because freeing it up might break the cleaned up page.

Offline

Board footer

Powered by FluxBB