Gmail.js – JavaScript API for Gmail

Note: The new Content Security Policy will prevent direct injection. Here is how to get around it

Note: This is not an official Gmail API, and isn’t affiliated with Google.

Note: Gmail.js requires jQuery to work

TL;DR Summary

Lots of api methods to work with gmail. Useful for chrome extensions
Most of them dont take arguments, they work on what is currently visible on the screen
I still need to add implementation for chrome extension, works by injecting js for now
Main methods allow you to observe certain events with gmail.observe.on(‘lots_of_actions_here’, callback()) or similar gmail.observe.before(…) and gmail.observe.after(…)
Click on a method link to view more detailed docs
Create an issue/pull request for feedback, requests and fixes

Since this is a chrome extension library, you can still use npm to get new changes

npm install gmail-js


Content Security Policy

The new Content Security Policy will prevent direct injection. Please see the following repository to get around the policies. More details

Original URL:

Original article

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: