mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
parent
77f585298f
commit
8c9332b62e
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user