Hacker News new | ask | show | jobs
by kartikt 4584 days ago
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.
1 comments

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/extensions/webRequest.html

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.