Skip to content

Commit

Permalink
example 'block images' - fix typo and add other extensions (puppeteer…
Browse files Browse the repository at this point in the history
…#334)

* fix typo and add extensions to example 'block images'

* fix code style, keep the newline at EOF
  • Loading branch information
noriaki authored and ebidel committed Aug 17, 2017
1 parent 2655f20 commit 21aa0a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/block-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setRequestInterceptionEnabled(true);
page.on('request', request => {
if (/\.(png|jpg|jpeg$)/.test(request.url))
if (/\.(png|jpg|jpeg|gif|webp)$/.test(request.url))
request.abort();
else
request.continue();
Expand Down

0 comments on commit 21aa0a2

Please sign in to comment.