From 21aa0a2390ca2c3639012959ad98844062322cca Mon Sep 17 00:00:00 2001 From: Noriaki UCHIYAMA Date: Fri, 18 Aug 2017 01:39:40 +0900 Subject: [PATCH] example 'block images' - fix typo and add other extensions (#334) * fix typo and add extensions to example 'block images' * fix code style, keep the newline at EOF --- 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 9ddd00ae076..aee649b5f4c 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$)/.test(request.url)) + if (/\.(png|jpg|jpeg|gif|webp)$/.test(request.url)) request.abort(); else request.continue();