From 3b03fdd2d0e0e92f79fce49e78b9d764537d77d1 Mon Sep 17 00:00:00 2001 From: Florian Reuschel Date: Sun, 20 Aug 2017 23:33:22 +0200 Subject: [PATCH] example 'block images' - make extension check case insensitive (#401) --- examples/block-images.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/block-images.js b/examples/block-images.js index aee649b5..469b25ac 100644 --- a/examples/block-images.js +++ b/examples/block-images.js @@ -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();