As those of you on the new version of Gmail might have noticed, nearly all Greasemonkey scripts that used to work on the old version no longer do. Even though it looks pretty similar, the new Gmail is entirely different from a JavaScript, HTML and CSS perspective, so this isn't surprising. Some of the scripts are no longer necessary. For example, saved searches aren't really needed, since searches now get their own URLs and can be bookmarked.

However, my Macros script is still needed; while the new version of Gmail does have additional keyboard shortcuts, it's still not possible to do everything from the keyboard. I've therefore ported it for the new version of Gmail, to install it, click below.

Install Gmail Macros

More specifically, the following keyboard shorcuts have been ported over:

g: Go to label

Go to label l: Apply label

Apply label b: Remove label

Remove label e: Archive (regardless of view, unlike "y")

Archive (regardless of view, unlike "y") d: Discard (mark as read and archive)

There is also a new keyboard shortcut, which the old script didn't have:

f: "Focus" the current view (only show unread, starred or inbox messages)

You may remember the script supporting other keyboard shorcuts. Since the new version of Gmail supports additional shortcuts, those have obsoleted. The new ones are:

shift + i : Mark as read

: Mark as read shift + u : Mark as unread

: Mark as unread shift + 3 : Move to trash (not actually new, but not many people seem to know this one)

: Move to trash (not actually new, but not many people seem to know this one) shift + 8 followed by a, n, r, u, s, or t: Select all, none, read, unread, starred, or unstarred

For those of you adventurous enough to look at the script source, you'll notice that it uses a gmonkey object that is present on the window, which in turn gets you a gmail object with methods like getNavPaneElement() and getActiveViewType() . What this means is that the version of Gmail, in addition to being faster, also has semi-official support for Greasemonkey scripts. I'm pretty sure docs for this API will be out soon, but in the meantime, feel free to look at the script and use a tool like Firebug to investigate the properties of the gmonkey and gmail objects and play around.

Update on 11/06/2007: And here are the semi-official docs.