Flash this

While I was impressed by Brent deleting his Flash plugin, I wasn’t willing to go quite that far to get rid of Flash banner ads. After all, one in fifty links to “this great Flash animation” really is slightly funny. Thanks to Michel, I don’t have to: a couple of CSS2 selectors in userContent.css, and it’s bye-bye Flash banners. Be sure you know where to find one to test it out against before you try it, though: I finally had to search out a company that designs Flash banners, just to be sure that there really wasn’t anything between “the Flash banner below” and “the above banner”. Sweet.

(Not using Mozilla/Phoenix? Um, what are you waiting for? Oh, selections in textareas?)

8 Comments

Comment by Dotan Dimet #
2002-11-06 03:56:15

The user style sheet hack didn’t work for me on the first couple of sites I tried, probably because all their ads aren’t really Flash, but IFRAMES with external source files (on advertising servers).

Killing off all the IFRAMEs on a page is trivial with a bookmarklet, and cleans up ads wonderfully. The problem is it’s not automatic – you need to click the bookmarklet, which means the ads have to annoy you enough for you to bother.

Actually, you could probably put this in a style sheet as well.

 
Comment by Phil #
2002-11-06 07:13:00

Chimera has selections in textareas. Come to the Mac side, Phil… </Darth Vader impersonation>

 
Comment by Phil #
2002-11-06 07:13:55

Wow, I just managed to kill your comment script – neat! Apparently it dies on encoded left and/or right brackets.

 
Comment by Phil #
2002-11-06 07:15:58

Although probably not in JavaScript. Nevertheless, I continue to lure you simply because Chimera rocks. ;)

 
Comment by Phil Ringnalda #
2002-11-06 07:43:13

Just a coincidence: DreamHost’s poorly written reaper decides to clobber whatever whenever, and you happened to be there at the wrong time, would be my guess.

 
Comment by Simon Willison #
2002-11-09 01:41:45

Killing iframes with a user style sheet should (in theory) be just as easy as killing flash ads – apply a display: none; rule to all iframes with a specific width/height and you should be fine.

 
Comment by Jeevan #
2002-11-09 09:11:17

The problem(?) with blocking IFRAMEs altogether is that many weblogs use them to lay out their page and so you’d be missing out on the content. Of course the weblogs that use IFRAMEs are usually the non-technical/personal weblogs which some here I’m sure don’t bother reading. ;-)

Thanks for the link to the Flash banner blocker Phil–I’ve been searching for a way to block these myself as they’re not only an eyesore, but also CPU-resource gobbling.

 
Comment by Dotan Dimet #
2002-11-14 03:54:07

I recycled my comment to a blog post, so you can see the javascript link there. It doesn’t do anything too clever, just uses getElementsByTagName to get all the IFRAMES and set their display property to none. You can do the same in a style sheet, of course.
The advantage of the bookmarklet is that you can make another oe which brings back all the Iframes and other elements you’ve hidden. You could probably combine the two approaches – hide all the annoyances with a style sheet, and bring them back with a bookmarklet when you need to see them.

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.