hide Flash banner ads in Mozilla
So you restlessly clicked on ‘Block images from this server’ until no more banner ads would show up, but never found a way to get rid of these annoying Flash banner ads?
CSS2 selectors to the rescue!
Just copy the following rules in your userContent.css file (you’ll find it in your profile’s chrome/ directory), and say goodbye to Flash advertising.
/* this hides the usual 468x60 Flash banner ads */
embed[type=”application/x-shockwave-flash”][width=”468″][height=”60″] {
display: none !important;
visibility: hidden !important;
}
/* this hides the not so usual but very annoying 728×90 Flash banner ads */
embed[type=”application/x-shockwave-flash”][width=”728″][height=”90″] {
display: none !important;
visibility: hidden !important;
}
You can easily extend these rules to cope with other banner sizes by copying a rule and changing the width and size attributes.
This was in response to this thread on Mozillazine forums.
12 responses
[…] log PHP, XML, CSS and general web development Skip to Navigation 6th November Michel: How to hide Flash banner ads in Mozilla using a few lines of CSS added to the userContent.css file […]
#1 Simon Willison: Archive for 6th November 2002 — 2002/11/05 at 20:14
[…] tidakada helps you to hide Flash banner ads in Mozilla using CSS. […]
#2 Axis Thoreau ::Die publicist die! — 2002/11/06 at 6:09
Flash this
Kill Flash ads in Mozilla with a little userContent.css
#3 phil ringnalda dot com — 2002/11/06 at 7:46
Hide Flash banner ads in Mozilla
Michel Valdrighi: “So you restlessly clicked on ‘Block images from this server’ until no more banner ads would show up,
#4 Too Much News — 2002/11/06 at 8:50
I’ve done a similar thing, but only for images. Instead of hiding them, I set their transparency to some high value - apart from being a neat effect, it also preserves page layout.
http://archivist.incutio.com/css-discuss/?id=13557
#5 Jan! — 2002/11/06 at 10:16
Slashdot post inspired by this entry:
http://ask.slashdot.org/comments.pl?sid=44367&cid=4614903
And Jan, I use the same low-opacity rule as you, along with full-opacity on :hover. Too bad the opacity property doesn’t work on Flash animations.
#6 Micah — 2002/11/08 at 0:36
Weniger Banner für Profis
Hide Flash banner ads in Mozilla
#7 RoyalTS - without cheese — 2002/11/08 at 19:55
I just figured out how to block based on string in the URL (e.g. a banner directory). The CSS script looks like:
img[src*=”banner”] {
display: none !important;
visibility: hidden !important;
}
#8 wik — 2002/11/16 at 0:52
What we really need is a way to stop the flash animations that leap between me and the page I am trying to read. Until there’s a good way to block those, I am refraining from installing the flash plugin.
#9 vbenares — 2002/12/12 at 5:25
Help me out here with this thought:
Make Mozilla think the MIME type of .SWF files is an image, then “Block Images from this Server” should work…
#10 Me — 2003/01/13 at 14:34
Ad blocking in Mozilla
Mozilla offers a way to hide ads on web pages. It’s not as easy as blocking pop-ups but if you
#11 Padawan.info — 2003/02/04 at 9:11
Blocking flash ads in mozilla
Just copy the following rules in your userContent.css file (you’ll find it in your profile’s chrome/ directory), and say goodbye to Flash advertising.
/* this hides the usual 468×60 Flash banner ads */
embed[type=”application/x-shockwave-flash…
#12 Paper-Bags.org — 2003/05/26 at 20:09
Your words