Skip to content

Commit 11dc353

Browse files
committed
Slightly clean up readme.
1 parent f532bae commit 11dc353

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@
22

33
![Build status](https://api.travis-ci.org/KartikTalwar/gmail.js.svg?branch=master)
44

5-
**Note:** The new Content Security Policy will prevent direct injection. **[Here](https://github.com/KartikTalwar/gmail-chrome-extension-boilerplate)** is how to get around it
5+
### What Gmail.js is and isn't
6+
7+
Gmail.js is meant to be used for creating WebExtension-based browser-extensions, for Chrome, Firefox and other compatible browsers.
8+
9+
It cannot be used server-side with Node, or from another web-app to interface with Gmail.
610

711
**Note:** This is not an official Gmail API, and isn't affiliated with Google.
812

913
**Note:** Gmail.js requires jQuery to work
1014

1115
### TL;DR Summary
1216

13-
- Lots of api methods to work with gmail. Useful for chrome extensions
14-
- Most of them dont take arguments, they work on what is currently visible on the screen
15-
- I still need to add implementation for chrome extension, works by injecting js for now
17+
- Lots of API methods to work with gmail. See documentation below.
18+
- Easy to use API. Data & DOM.
19+
- Reasonably complete TypeScript-support.
20+
- Many methods are contextual and will work with whatever is on screen when no arguments are given.
21+
- Obtain email data, react to event, etc. No need for OAuth!
1622
- 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(...)`**
17-
- Click on a method link to view more detailed docs
18-
- Create an issue/pull request for feedback, requests and
19-
fixes. See
20-
[CONTRIBUTING.md](https://github.com/KartikTalwar/gmail.js/blob/master/CONTRIBUTING.md) for
21-
more details.
22-
- Basic TypeScript-support from type-declarations file [gmail.d.ts](https://github.com/KartikTalwar/gmail.js/blob/master/src/gmail.d.ts).
23+
- Create an issue/pull request for feedback, requests and fixes. See [CONTRIBUTING.md](https://github.com/KartikTalwar/gmail.js/blob/master/CONTRIBUTING.md) for more details.
2324

24-
### Installation
25+
### Using Gmail.js
2526

26-
Since this is a chrome extension library, you can still use npm to get new changes
27+
If you know how to create WebExtensions-based extensions for Firefox and Chrome, you can get started by pulling Gmail.js like this:
2728

2829
```
2930
npm install gmail-js
3031
```
3132

33+
**Note:** Please ensure that Gmail.js is injected into the regular DOM.
34+
Gmail.js does not work as a content-script.
3235

33-
### Examples
34-
35-
- **[Gmail Hacks](https://chrome.google.com/webstore/detail/gmail-hacks/aacloklpepaibhlikiakfcgjjappeppo)** by [@arpitnext](https://github.com/arpitnext) (*[Source](https://github.com/arpitnext/play_with_gmail.js)*)
36-
- **[Example to use gmail.js in firefox addon](https://github.com/rinkudas/gmail-firefox-addon-boilerplate)** - It provides basic functionality to inject gmail.js within gmail for using it in a Firefox addon.
37-
- **[GmailJS Node Boilerplate](https://github.com/josteink/gmailjs-node-boilerplate)** - Example for how to use GmailJS with NodeJS and script-bundling for instant load-times.
38-
39-
## Content Security Policy
36+
For some ready to use examples/boilerplate repos, look no further:
4037

38+
- **[GmailJS Node Boilerplate](https://github.com/josteink/gmailjs-node-boilerplate)** - Example for how to create a browser-extension using GmailJS and modern javascript with NodeJS and script-bundling for instant load-times.
39+
- **[GmailJS Legacy Boilerplate](https://github.com/KartikTalwar/gmail-chrome-extension-boilerplate)** - Example for how to create a browser-extension using traditional script-loading. (Requires less tooling, but is less reliable)
4140

42-
The new Content Security Policy will prevent direct injection. Please see the following repository to get around the policies. More details can also be found in issue [#75](https://github.com/KartikTalwar/gmail.js/issues/75)
41+
### Content Security Policy
4342

44-
#### https://github.com/KartikTalwar/gmail-chrome-extension-boilerplate
43+
Content Security Policy (CSP) will prevent direct injection. Please see the following repository to get around the policies. More details can also be found in issue [#75](https://github.com/KartikTalwar/gmail.js/issues/75)
4544

45+
See the examples linked above for how to get around that.
4646

4747
## Setup
4848

0 commit comments

Comments
 (0)