Unfortunately this type of hacking isn't really sustainable. Even small tweaks to the Gmail UI often change the DOM in very unpredictable ways. When they released the new compose feature, pretty much every single Gmail Chrome extension broke.
We haven't really announced it yet, but I've been working on a new email platform with some friends to solve a lot of these issues. It's essentially Rails/Meteor for email features, and lets you skip past hacking Gmail or writing a full IMAP client.
It's called Inbox, and we're aiming to open source it in January. Ping me if you're interested in playing with it early. :)
Thanks for your feedback. I agree, which is why i decided to put it out there because I use the library in a chrome extension and if something breaks, I would be trying to get the extension fixed - patching gmail.js. Still better than finding random solutions from here and there or duplicating efforts. :-) I'd be interested in seeing what you guys are working so, so I'll ping you soon
Yeah, I'm certainly not meaning to belittle your efforts. I wrote something similar (based on jamesjyu's gmailr stuff) for my thesis last year. It's the best way to do it for relatively simple one-off projects.
The first big challenge is definitely just having a shared toolkit, but it's next to impossible to provide backwards-compatible APIs when the Gmail UI changes.
I have encountered this across various other google services. Case in point: I was hacking together a simple Alfred (http://www.alfredapp.com/) extension, using AppleScript to allow creating & searching of google keep notes. It broke about 2 days afterwards and, in the absence of official (stable) endpoints from google themselves, I gave up on the idea.
This! You're doing it right. I wish all the Gmail tweakers united to build a better platform rather than spend their time propping the old, PRISM-tainted, UI-crippled service.
We haven't really announced it yet, but I've been working on a new email platform with some friends to solve a lot of these issues. It's essentially Rails/Meteor for email features, and lets you skip past hacking Gmail or writing a full IMAP client.
It's called Inbox, and we're aiming to open source it in January. Ping me if you're interested in playing with it early. :)