Staticfree Blog

Back to the main blog

Tue, 11 Apr 2006

What 'taking back the web' really means

Firefox's slogan, "taking back the web" isn't just about blocking pop-up ads. One of the new features that comes in it out-of-the-box in version 1.5 is a way to add custom CSS to other peoples' websites (when viewed on your computer). This lets you fix the little quirks that may make themselves evident on websites that you frequent, but have no ability to fix.

One such site is my Livejournal friends page. When I view it in my normal 2-up browser mode (with 2 Firefox windows open, side by side each 640px wide), images embedded in the page often cause a horizontal scroll bar. This then causes the text to fill to fit the resized area and makes me maximize the window to be able to read it. While I can tweak the colors and such, I can't actually modify the CSS without getting a paid account (and I don't think I care that much).

My solution? Close Firefox then edit my ~/.mozilla/firefox/profilename/chrome/userContent.css file. Then add this block:


@-moz-document url-prefix(http://xxv.livejournal.com/friends/){
  img {
     max-width: 70%;
     height: auto;
  }
}

(If you are trying to use this, make sure you modify the URL for your username).

Now if I open my friends page in Firefox, it scales down all the images so they fit in the browser. If I want to look at one, I can maximize the window or open the image in a new tab.

userContent.css has been around for a long time to allow you to inject default CSS into all the pages that you view. Firefox 1.5 supports a special selector type @-moz-document which lets you match based on the current URL.

Being able to change the way you look at websites is really what "taking back the web" is all about. Platypus is another wonderful example of this, ultimately more useful than the hack mentioned above. With it you can change content in addition to simple style. Don't like an aspect of a website you frequent? Platypus lets you click on it and delete it, making it go away the next time you visit too.

Remember: a website is just text and links to images organized in a standard way. You can do anything to text, if you know how it's arranged and if you have control of what presents it. Could you do this in a closed, binary format such as Flash? No. Never.

trackback enabled

Comments

Re: What 'taking back the web' really means

Brigitte @ Wed, 12 Apr 2006 03:16

You got some problem with my closed, binary career?

Re:

Steve Pomeroy @ Wed, 12 Apr 2006 08:04

I like what you can do with Flash, I just don't see it having the same future as more open formats.

I have a feeling that eventually, Flash will be replaced by XHTML+Javascript+CSS+SVG and you'll be able to use those technologies just as well. That happened with music software and mp3s, Java applets and AJAX, etc. People don't want to be locked into formats that aren't transparent.

Look at the OS X Dashboard widgets, as a hint of that. Those easily could have been done in Flash, but then they wouldn't catch on like they have. By using XHTML+CSS+Javascript, I think they have much better staying power.