example 'block images' - make extension check case insensitive (#401)
This commit is contained in:
parent
9ede3144c5
commit
3b03fdd2d0
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user