docs(Readme): add loading extensions example (#1308)

This patch adds a tips-and-tricks section to the `readme.md` that explains
how to load extension to puppeteer.
This commit is contained in:
Eric Bidelman 2017-11-07 13:19:54 -08:00 committed by Andrey Lushnikov
parent 77f585298f
commit 8c9332b62e

View File

@ -6,6 +6,23 @@ Assuming you have a checkout of the Puppeteer repo and have run yarn (or npm i)
NODE_PATH=../ node examples/search.js
```
# Tips & Tricks
### Load a Chrome extension
By default, Puppeteer disables extensions when launching Chrome. You can load a specific
extension using:
```js
const browser = await puppeteer.launch({
headless: false,
args: [
'--disable-extensions-except=/path/to/extension/',
'--load-extension=/path/to/extension/',
]
});
```
# Other resources
> Other useful tools, articles, and projects that use Puppeteer.