Android: The GPhone is a Robot, and it isn’t a phone Arrington and Romney on Talk Crunch
Nov 05

Gmail Greasemonkey Macros: Back, and Gmail even has support!

Google, Tech with tags: , Add comments

Gmail recently got a JavaScript facelift which has subtle new features. For example, calendar attachments, smart top notices when you are disconnected and how the interface is retrying, and more.

However, most Greasemonkey scripts broke. This is bad news for me, as without Mihai’s macros script I feel real pain as I try to vi my way around the interface.

The new Gmail interface did add more keyboard shortcuts such as:

  • shift + i: Mark as read
  • shift + u: Mark as unread
  • shift + 3: Move to trash (not actually new, but not many people seem to know this one)
  • shift + 8 and a, n, r, u, s, t: Select all, none, read, unread, starred, unread

But, this isn’t quite enough. Luckily, Mihai has stepped up and ported over his work.

He has ported over:

  • g: Go to label
  • l: Apply label
  • b: Remove label
  • e: Archive (regardless of view, unlike “y”)
  • d: Discard (mark as read and archive)

and added:

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

What is really cool is how Dan Pupius and the team have truly acknowledge the Greasemonkey folk and have given us hooks to help us monkey around with Gmail:

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 official 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.

Thanks Mihai and Dan!

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: What is the number before 3? (just put in the digit)

Loading...