Created
March 15, 2017 13:17
-
-
Save roydondsouza/7a1bd75e2ed11e686d766076e1e8947b to your computer and use it in GitHub Desktop.
Gmail JS - Experimental Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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