Tuesday, May 03, 2005

Stopping inlined video

Call me a control freak, but I want my computer to work for me, not against me. I don't want popups ad, blinking text or inlined video on web pages. I love Firefox because it lets me view the web the way I want.

Tabbed browsing is one of those features that I never really thought was interesting until I started using it. Now I can't live without it. (how did people ever survive without microwave ovens?)

It happens on occation that I middle-click several links and open them all in new tabs. Then as they're loading, I hear music playing. Grrr.... I'm already listening to music, and having a web page play a different song is really annoying. I shouldn't have to be subjected to someone else's music. Which tab is that? I don't want to close them all, just want the music to stop.

Video is worse. I run dual monitors and have my video drivers set so that if I'm playing a video, it goes full screen on the other monitor. I often watch TV on one monitor while browsing/coding/chatting on the other. Well, when a web page has inlined video, it starts playing full screen on my other monitor -- not what I want.

Time to do something about it. I had a long plane flight on my trip to Romania last week (vacation report coming soon) so I started tinkering with local files and figured out how to make it stop.

So if you want to block inlined videos (or anything else) from playing in web pages, here's how:
  • If you don't already have a userContent.css file, start a new one, if you already have one, just add to it.
  • userContent.css is located in your Firefox profile directory (click for help finding it). Inside your profile directory, open the Chrome folder. There's a file called "userContent-example.css" and it can be ignored (or if you're adventerous, you can read it for more tips).
  • Add the following lines to userContent.css:
      embed[type="application/asx"] { display: none !important;}
      embed[type="video/x-ms-asf-plugin"] { display: none !important;}
      embed[type="application/x-mplayer2"] { display: none !important;}
      embed[type="video/x-ms-asf"] { display: none !important;}
      embed[type="video/x-ms-wm"] { display: none !important;}
      embed[type="audio/x-ms-wma"] { display: none !important;}
      embed[type="audio/x-ms-wax"] { display: none !important;}
      embed[type="video/x-ms-wmv"] { display: none !important;}
      embed[type="video/x-ms-wvx"] { display: none !important;}

  • Quit Firefox.
  • Save the file (if you save it while FF is open, your changes will be lost when you quit).
  • Restart Firefox.
Any of the above mime types will not be shown on web pages. If you find something that still plays (e.g. real player), you can use View -> Source to find the content type and add another line to block it as well.

0 Comments:

Post a Comment

<< Home