More aggressive blocking for data: refresh attempts (thanks insertscript).
This commit is contained in:
parent
949d930662
commit
ab2f078ca6
|
@ -118,8 +118,8 @@ notifyPage();
|
||||||
addEventListener("DOMContentLoaded", e => {
|
addEventListener("DOMContentLoaded", e => {
|
||||||
if (ns.canScript) return;
|
if (ns.canScript) return;
|
||||||
for (let m of document.querySelectorAll("meta[http-equiv=refresh]")) {
|
for (let m of document.querySelectorAll("meta[http-equiv=refresh]")) {
|
||||||
if (/^[^,;]*[,;]url[^\w=]*=\s*data:/.test(m.getAttribute("content"))) {
|
if (/^[^,;]*[,;]\W*url[^=]*=[^!#$%&'()*+,/:;=?@[\]\w.,~-]*data:/i.test(m.getAttribute("content"))) {
|
||||||
let url = m.getAttribute("content").replace(/.*?(?=data:)/, "");
|
let url = m.getAttribute("content").replace(/.*?(?=data:)/i, "");
|
||||||
log(`Blocking refresh to ${url}`);
|
log(`Blocking refresh to ${url}`);
|
||||||
window.stop();
|
window.stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue