Shuffle your Dreamhost rewards page

Back at the day Jesse Ruderman wrote a script putting the block containing “You currently have $X.XX of Rewards payments built up!” at the top of the Dreamhost rewards page. Now some people might find it useful, but there are also other people (like me), without any payments built up (yet…), who would like to see the “Referral Reports” block at the top. Here is the greasemonkey script that does exactly that: shuffle.your.dreamhost.rewards.page.user.js

While considering the code of those two similar scripts, with all due respect to Jesse, I think that my solution is more general and simpler at the same time (always KISS), meaning that it allows you to reorder all of the blocks in any way you want (and it’s done in a painless way too).

There’s also a word of advice to myself (and maybe to others as well) – or in other words, a reminder. When creating greasemonkey scripts, the simpler hack you use, the better your script will be. It’s really futile trying to protect your script from the HTML changes. You just can’t predict every single one of them. All of those scripts are just hacks, that can be broken with just a slight change in the HTML code. So you shouldn’t worry about your script not being robust enough. That’s ok. You will have to fix it at some point in the future anyway.

Have fun!

Greasemonkey Firefox extension

I’ve been a little hesitant about installing greasemonkey as I already have too many installed extensions (seven at that time). Even though celebrities (also called A-list bloggers) like Robert Scoble were praising it. What convinced me was this little script that always switches gmail into https mode. So simple, yet so useful. I just could not resist.

 // ==UserScript==
 // @name          GMailSecure
 // @namespace     http://diveintogreasemonkey.org/download/
 // @description   force GMail to use secure connection
 // @include       http://gmail.google.com/*
 // ==/UserScript==
 window.location.href=window.location.href.replace(/^http:/, 'https:');

And then came the madness of installing more and more user scripts. I was hooked.

EDIT: All your (x)HTML are belong to us.