Skip to content

Commit

Permalink
docs(Readme): add loading extensions example (puppeteer#1308)
Browse files Browse the repository at this point in the history
This patch adds a tips-and-tricks section to the `readme.md` that explains
how to load extension to puppeteer.
  • Loading branch information
ebidel authored and aslushnikov committed Nov 7, 2017
1 parent 77f5852 commit 8c9332b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8c9332b

Please sign in to comment.