Skip to content

Instantly share code, notes, and snippets.

@roydondsouza
Created March 15, 2017 13:17
Show Gist options
  • Save roydondsouza/7a1bd75e2ed11e686d766076e1e8947b to your computer and use it in GitHub Desktop.
Save roydondsouza/7a1bd75e2ed11e686d766076e1e8947b to your computer and use it in GitHub Desktop.
Gmail JS - Experimental Draft
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://github.com/KartikTalwar/gmail.js/raw/master/src/gmail.js">
// {inject gmail.js} by copy pasting gmail.js contents or via url like jquery above
// var Gmail = {.....} // paste gmail.js code here
// start using!
// you can also pass in a reference to jQuery upon init - Gmail(localJQuery)
var gmail = Gmail();
gmail.get.user_email();
gmail.observe.on('compose', function(obj) {
console.log('compose', obj);
});
gmail.observe.on('new-email', function(obj) {
console.log('new-email', obj);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment