Live data from Hacker News

Show HN: Gmail.js – JavaScript API for Gmail

github.com

11–20 of 63 posts

Re: Show HN: Gmail.js – JavaScript API for Gmail

#11
post #2

Interesting - and a very good job given what you have to work with. Surely its incredibly brittle, though? As soon as they release a new version of Gmail it's going to fail. But then, I suppose that's how most Chrome extensions work.

Yeah, the strange selector names that never cease to change were what ultimately caused me to abandon my relatively popular Chrome extension "Gmail Attachments to Drive". Having to constantly update the code every time Gmail changed just got old really, really fast.

Re: Show HN: Gmail.js – JavaScript API for Gmail

#15

It would be amazing if this were a service. Easier said than done, I know -- but, basically this but have it check a JSON file every few hours and gets the updated selectors. (For people who don't know, all GMail's classes and IDs are things like '.xb3', and they change often.) Having worked on Mozilla Add-ons for a long time, one of the biggest problems was by the time any G-Mail add-on was approved, it was already…

Not sure Google would like this?

Re: Show HN: Gmail.js – JavaScript API for Gmail

#16
This is pretty useful. A couple months ago I started making a free self-hosted version of Boomerang for Gmail, but lost interest because I felt like I would have to devote most of my time to gmail's idiosyncrasies. Maybe it's time to get back to work.

Is there a way to add navigation events (eg. user opened email) to the observe gmail.observe API? Right now it looks like I would have to poll gmail.check.is_inside_email.

Re: Show HN: Gmail.js – JavaScript API for Gmail

#17

It would be amazing if this were a service. Easier said than done, I know -- but, basically this but have it check a JSON file every few hours and gets the updated selectors. (For people who don't know, all GMail's classes and IDs are things like '.xb3', and they change often.) Having worked on Mozilla Add-ons for a long time, one of the biggest problems was by the time any G-Mail add-on was approved, it was already…

[deleted]

Re: Show HN: Gmail.js – JavaScript API for Gmail

#18
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. :)

Re: Show HN: Gmail.js – JavaScript API for Gmail

#19
post #7

Earlier quoted context omitted.

Neat suggestion. It could totally be uploaded to a cdn where people can simply import it and once a change occurs on Gmail and the script gets updated, everybody benefits.

That probably won't work. The add-on reviewers are very strict about running arbitrary code loaded from somewhere else, and no add-on using it would be approved. (After all, you could change your code and store people's emails.) That being said, you should be able to use this to load new selector strings for the API: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/... http://developer.chrome.com/extension…

It wouldn't necessarily need to be code. It could just be JSON data with updated selectors, etc. Just make sure you use JSON.parse on it, and there aren't any security issues from just fetching the data.

Re: Show HN: Gmail.js – JavaScript API for Gmail

#20

Earlier quoted context omitted.

That probably won't work. The add-on reviewers are very strict about running arbitrary code loaded from somewhere else, and no add-on using it would be approved. (After all, you could change your code and store people's emails.) That being said, you should be able to use this to load new selector strings for the API: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/... http://developer.chrome.com/extension…

It wouldn't necessarily need to be code. It could just be JSON data with updated selectors, etc. Just make sure you use JSON.parse on it, and there aren't any security issues from just fetching the data.

Yeah, that's what I'm saying -- you can't use this library from a CDN, but you could load JSON.
Post reply on HN