03.03.06

Sanitizing MySpace

Posted in Web, Technology at 1:29 am by Danny Dawson

Note: This solution is outdated! I strongly suggest using this greasemonkey script instead.

Everyone’s got gripes about MySpace. I’m no exception. Here are the things I loathe most:

  1. Embedded audio, especially when it plays automatically. If you’ve got a song you want me to hear, link to it and tell me why you like it. I’ll decide whether or not I want to listen, thanks.
  2. Background images that interfere with the foreground text or are otherwise distracting. I hate not being able to read things that I’m meant to.
  3. Giant images that screw with the page layout. Can’t you create a thumbnail? In addition to the borked layouts, I hate having big distracting images on my screen that other people can see from across the room. If I want to see the original size, I can Right Click > View Image.
  4. Ads of all shapes and sizes. I hate banner ads, large and small, whether they’re little animated gifs that dance on my screen or big flash banners that make noise when I accidentally move my mouse cursor over them.
  5. Wantonly “dimmed” text and images. So you discovered -moz-opacity, eh? Don’t abuse it.

So I did what I always do before I write a blog post - I fixed it. Now, there’s already a greasemonkey script out there that does some of this things, and more, in some cases, but to be honest: I don’t like it. Maybe it’s just the “Flash of Unstyled Content” that happens while the page is still loading and before the script triggers; maybe I think the script goes too far in what it takes out; maybe, in some areas, it doesn’t do enough.

I decided to take a different route towards fixing the problem. Instead of a javascript solution, I opted for a pure CSS solution in the form of site-specific rules within a user stylesheet. My final version takes care of all of the things that bug me most, making MySpace usable again.

It’s a cinch to install it yourself (requires Mozilla Firefox, of course):

  1. Download the MySpace Sanitizer Stylesheet and save it into your Firefox chrome directory in your user profile. Don’t know where that is? Mine is in C:\Documents and Settings\Danny Dawson\Application Data\Mozilla\Firefox\Profiles\gobbledygook.default\chrome\. Yours is likely in almost the same place. If not, check C:\Program Files\Mozilla Firefox\. I have faith in you.
  2. Restart Firefox.

Keep in mind that this solution isn’t meant to remove all of the custom styles that people use within their profiles - just the ones that annoy me. That said, if you run into something really annoying, let me know about it and I’ll look into it if I have the time.