Advertise here with Carbon Ads

This site is made possible by member support. โค๏ธ

Big thanks to Arcustech for hosting the site and offering amazing tech support.

When you buy through links on kottke.org, I may earn an affiliate commission. Thanks for supporting the site!

kottke.org. home of fine hypertext products since 1998.

๐Ÿ”  ๐Ÿ’€  ๐Ÿ“ธ  ๐Ÿ˜ญ  ๐Ÿ•ณ๏ธ  ๐Ÿค   ๐ŸŽฌ  ๐Ÿฅ”

Ad blocking with CSS for Mozilla

Ad blocking with CSS for Mozilla.

Reader comments

Ryan SchroederApr 25, 2003 at 3:25PM

Will this work in safari? Or is the [HREF*="ad."] part not supported?

George KaplanApr 25, 2003 at 4:30PM

Or in Mac/Win IE for that matter?

dowingbaApr 25, 2003 at 9:23PM

IE is too far gone, let it rest in ad-saturated peace.

George KaplanApr 25, 2003 at 10:45PM

That's okay...I don't use it anyway.

dowingbaApr 30, 2003 at 3:17AM

I tried it on Mozilla 1.3 and it didn't seem to do anything (I almost definitely did it wrong though, so don't fret).

EpApr 30, 2003 at 4:05PM

This works *almost* perfectly in Phoenix. The only problem I have is that it blocks the lastpost button in vB forums (still trying to figure that out). Thanks for the link!

dowingbaMay 01, 2003 at 2:17AM

I don't know how good this script is. Looking at the code, it just blocks stuff from certain specific ads. Of course they are very popular ads, but Mozilla (1.3) already has a feature where you can choose to block specified ads. And (you need the advanced prefs editor to do this) you can stop loads of other annoying ad-techniques...like blinking text (ugh). Maybe this script for some reason doesn't work on 1.3 or is already implemented (but under another name). Certainly I rarely see pop-ups or banner ads anymore without the script.

floppymooseMay 25, 2003 at 8:30AM

Ep: Your problem with the lastpost button is an example of a false postive. That button must be an image inside a link, with the href matching one of the search patterns. The simplest way to fix this is to override the css for that href. See the examples that are already in the userContent.css example I posted. You will want to add a new line to the file similar to the ones under the comment "/* turning some false positives back off */". It should use the href (or some significant portion of it) of the link for that button. Be sure to restart your browser after the edit to pick up the change.

If you have trouble doing this, then just send me the url of the page and I'll post a new userContent.css file that works with it.

This thread is closed to new comments. Thanks to everyone who responded.