Greasemonkey category archive

Release: Better Gmail Firefox extension

April 16th, 2007 | Filed under Browsers, Greasemonkey, Extensions, Release

Been awhile since I’ve spent the entire weekend happily coding in a haze, but that’s what happened yesterday and Saturday. The result is the Better Gmail Firefox extension, which packages up my favorite Gmail Greasemonkey scripts into one, standalone extension, with the help of the awesome Greasemonkey Compiler. Check it out.

Lifehacker Code: Better Gmail (Firefox extension)

July 26th, 2006 | Filed under Design, Greasemonkey, Open source

There’s no feeling quite as sweet as when you discover code you set a sail into the public domain ages ago was republished and improved upon by others. Thomas Upton took my del.icio.us Prettifier Greasemonkey user script and modified it to make del.icio.us even prettier. Nice work, Thomas.


MovableType and > 250(0) categories

February 9th, 2006 | Filed under Javascript, MovableType, Greasemonkey

Warning: Rambling about work ahead.

I went off on MovableType’s atrocious performance while posting to Lifehacker awhile back. Turns out that one of MT’s biggest performance pain points is the huge number of possible post categories the Gawker sites (including Lifehacker) use - a number that goes well into the thousands. (Why, you ask? Well, narrow topic silos and focused category pages make for good sponsorship opportunities and highly-targeted text ads and great Google-fu, and we’re an advertising-supported business.)

Anyway, we use a plugin for MT that turns categories into “tags,” allowing you to enter categories in a del.icio.us style input box versus the clumsy category dropdown. “Go nuts with tags!” was the editorial edict. So we did, adding categories at a clip. Sadly, we were shooting ourselves in the foot. Rendering the interface with a list of hundreds of tags slowed things considerably, specifically, the “suggest a tag” Javascript on the New and Edit Entry pages. Apparently MT’s not built to handle more than 250 2500 categories per site, and we’re the first to push this limit. (Buh? 2500 is a lot more reasonable than 250. Tx Anil.) Also, apparently MT’s database interface makes what only needs to be one query for one recordset one query PER CATEGORY - thus, hundreds of queries per page request, hence the slowdown. (As a developer, can I just say - WTF, 6A? Anyway.)

Gawker’s solution was to remove the helper Javascript from the MT interface and have us enter tags cold; for me and my co-editors this was unacceptable, given how prone we are to typos and crazy variations of the same tag (”Mac,” “OS X,” “Mac OS X”, “Stuff we like,” “Things we like,” “Books”, “book,” etc.)

Fortunately for Gawker, I don’t have any access to the MT installation or template editing/creation for Lifehacker, so I was a bit handcuffed, not able to do much except complain loudly. Finally, to stop the tag mess from getting worse editorially, I wrote a Greasemonkey script which includes the static category list Javascript from afar on those pages, which is super damn fast AND gives us back the past tag helper. I’d publish that script but it’s got a little too much information about our server setup and is specific to the tags plugin, so I won’t. But you get the idea.

If we can get a category template of that Javascript include publishing every few hours and including newly-created tags (the existing one doesn’t update with new tags, boooo), life will be good.

Now back to our regularly-scheduled programming. (Ha!)


Common Greasemonkey Pitfalls

December 9th, 2005 | Filed under Javascript, Greasemonkey

The Greasemonkey user script that saves me several minutes of typing every day broke with Firefox 1.5 and Greasemonkey 0.6.4. But thanks to the ever-instructive Mark Pilgrim and his O’Reilly article about safe Greasmonkey scripting, it now works. Specifically the “Pitfall #3: Named Forms and Form Elements” section addressed the bit that was tripping up my old code.

If you too use Movable Type, my user script autofills in the upload directory with a date-based folder name - great for rapid-fire posting with tons of images, like on Lifehacker.

Set MT Upload Directory [Scribbling.net]

O’Reilly Network: Avoid Common Pitfalls in Greasemonkey [O’Reilly Network]