Doug's Blog

A hodgepodge of links and occasional essays. Now with less navel-gazing.

Archive for the ‘javascript’ tag

No Suggestions, my first Greasemonkey script

Comments

I have a tendency to complain about first-world problems on Twitter; it’s not something I’m proud of, but I’m certainly not the only one with the problem.

Lately I’ve been complaining about Facebook’s “Suggestion” box, the intrusive little widget of the right side of the main stream page. I won’t spend anytime explaining why it infuriates me so, but suffice to say it was really pissing me off.

Today I wrote a Greasemonkey script — my first-ever Greasemonkey script — so I wouldn’t have to see it anymore. It’s called No Suggestions.

If the “Suggestions” box irritates you as much as it did me, I welcome you to install it from Userscripts.org or my project page. Just remember you’ll need to install Greasemonkey for Firefox first. (I was informed via Twitter that No Suggestions apparently also works with Opera.)

As of this writing, Userscripts.org shows nine installs of No Suggestion, so I’m apparently not the only one who hates that box.

More on Greasemonkey

No Suggestions is an extremely simple script. Anyone with some basic JavaScript experience can get started with Greasemonkey, and that was certainly my only qualification this morning. I read a top-level summary of what I needed to know from Dive Into Greasemonkey and got started; about four minutes later, I was done.

After some testing, I noticed the script was only working about nine out of 10 times. Turns out Facebook loads the contents of the “Suggestions” box with JavaScript, and Greasemonkey was occasionally firing before the box had loaded. That was fixed easily enough by adding second method for hiding the box (adding a CSS declaration). Ten minutes total. I suspect it won’t be my last Greasemonkey script.

If you have any other good Greasemonkey scripting resources or ideas for what I should script next, please leave them in the comments.

Written by Doug

December 22nd, 2009 at 10:32 pm