Skip to content

ebeltran1981/chrome-extension-sf-gmail

Repository files navigation

AtlanticBT Chrome Extension

This extension is tightly coupled to Salesforce Lightning for Gmail extension. It uses the session cookie generated by the login to perform all tasks.

It also uses the jsforce library to perform CRUD and SOQL queries against Salesforce.

Due to a change in behavior from the last Salesforce deployment up to the time of this writing, I had to fork the library and make a change to disable jsonp. See GitHub fork specifically the branch disable-jsonp and the issue #611.

Before running this project

You must clone the jsforce GitHub fork locally, switch to the disable-jsonp branch and use npm link to create a local symlink to your local repo instead the npm one. See this post for more details.

This project is built using TypeScript and Webpack.

Libraries

  • For a complete list, see the package.json file under dependencies.

Running the project

  • Must have NodeJS and NPM installed.
  • From the project directory run: npm install
  • Then run: npm start to trigger webpack in watch mode

Notes

The webpack configuration file, package all the files to the dist folder. This is the folder to be use at Chrome Extensions to manually load the extension for development.

The project has three main files: webPage.ts, contentScripts.ts and backgroundEvents.ts.

webPage.ts

This is the file that gets injected inside the Gmail page. It acts as a regular script file, and do not have direct access to the entire Chrome API.

contentScripts.ts

This is responsible for injecting the webPage.ts file into Gmail, and handle some of the communication between webPage.ts and backgroundEvents.ts; like getting the extension Id for subsequential communication between the two.

backgroundEvents.ts

This is the backbone of this extension. Is where all the domain logic resides. Notifications, Storage, Cookies, Salesforce, etc.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published