From 8b3a36b2e463fa12fbac746a2a772b00268fc6f1 Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 21 Mar 2020 01:55:22 +0100 Subject: Fixed URL matching regexp (thanks insertscript). --- src/content/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/content.js b/src/content/content.js index 29330b7..46c6fc5 100644 --- a/src/content/content.js +++ b/src/content/content.js @@ -118,7 +118,7 @@ notifyPage(); addEventListener("DOMContentLoaded", e => { if (ns.canScript) return; for (let m of document.querySelectorAll("meta[http-equiv=refresh]")) { - if (/^[^,;]*[,;]\W*url[^=]*=[^!#$%&'()*+,/:;=?@[\]\w.,~-]*data:/i.test(m.getAttribute("content"))) { + if (/^[^,;]*[,;]\W*url[^=]*=[^!#$%&()*+,/:;=?@[\]\w.,~-]*data:/i.test(m.getAttribute("content"))) { let url = m.getAttribute("content").replace(/.*?(?=data:)/i, ""); log(`Blocking refresh to ${url}`); window.stop(); -- cgit v1.2.3