Skip to content

Commit

Permalink
example 'block images' - make extension check case insensitive (puppe…
Browse files Browse the repository at this point in the history
  • Loading branch information
loilo authored and aslushnikov committed Aug 20, 2017
1 parent 9ede314 commit 3b03fdd
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|gif|webp)$/.test(request.url))
if (/\.(png|jpg|jpeg|gif|webp)$/i.test(request.url))
request.abort();
else
request.continue();
Expand Down

0 comments on commit 3b03fdd

Please sign in to comment.