Giter VIP home page Giter VIP logo

gmail-chrome-extension-boilerplate's Introduction

Gmail.js Chrome Extension

Hello world chrome extension using gmail.js

This is a sample chome extension that uses gmail.js to build apps on top of Gmail.

The manifest in this repo bypasses the new Content Security Policy (CSP) enforced by Gmail.

Please use the latest gmail.js file from the original repo linked below

http://github.com/kartiktalwar/gmail.js

gmail-chrome-extension-boilerplate's People

Contributors

amfeng avatar iblazevic avatar itsazzad avatar jonathan-eyler-werve avatar josteink avatar kartiktalwar avatar tom76kimo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmail-chrome-extension-boilerplate's Issues

Passing messages between `content.js` and `main.js`

I'm trying to get chrome extension options using chrome.storage.sync from within my main.js but cannot access the same chrome object as the content script. The main.js chrome object does not have the same functionality as the one in content.js.

I figured that a way round this was messaging between the scripts but cannot get that working.

If anyone has a working example of passing messages between main.js and content.js within the context of this boilerplate that would be great.

Or if that is no doable, getting access to extension options from main.js will do.

Communication with background script

This isn't an issue with the library itself, but just hoping to get you feedback. If the content script was just a normal script and didn't embed js links in the dom, you could communicate with a background script using:

    chrome.runtime.sendMessage data, (response) ->

However, if you embed the main.js in to the and I define some behavior on the read_email event, I need to send some messages to a background script. Because I'm now in the actual tab, not in the content script, I haven't been able to use chrome.runtime.sendMessage because it seems like it's out of context of the extension at that point.

Do you have suggestions on getting back in to the extension?

jquery isn't loading

If I load this boilerplate up as is, I get this error:

Uncaught TypeError: Cannot read property 'extend' of undefined

Looks like jquery isn't loading before gmail.js needs it

All files are reloaded on each user actions in Gmail

Hi,

With this boilerplate, each time we open/close/write email, navigate in history, all files are reloaded.
I think this makes Gmail crash. This is the case with my extension as soon as I declare observers.

License

Could you please add a license to this? I think it would make sense to use MIT since that's what gmail.js uses. I'd be happy to send a PR if you like, though I think GitHub has a pretty nice UI for adding licenses.

How do I call this from background.js?

The main.js is working as it calls gmail.get.user_email() fine. However, I want to do something when the icon is clicked. I added a background.js that has chrome.browserAction.onClicked.addListener and it gets called but I cannot access the gmail object.

Do I have to enable something for this? Am somewhat new to extensions so I feel like I am missing a step.

Thanks for any tips or pointers.

Error in popups: Gmail is not defined

I noticed with this installed, if I pop an email out to a new window, or click a toast notification for a new inbox message so that it opens in a new window, this error is thrown.

What is the proper way to ensure popups like these work properly?

I can call refresh(main); from the console window of the popup and I get the hello message, so I'm guessing it just needs to be told to run again at load somehow?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.