We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 909e960 commit 37928bdCopy full SHA for 37928bd
1 file changed
src/content/onScriptDisabled.js
@@ -10,15 +10,17 @@ function onScriptDisabled() {
10
let content = meta.getAttribute("content");
11
if (content) {
12
let [secs, url] = content.split(/\s*;\s*url\s*=\s*/i);
13
+ let urlObj;
14
if (url) {
15
try {
- let urlObj = new URL(url.replace(/^(['"]?)(.+?)\1$/, '$2'));
16
+ urlObj = new URL(url.replace(/^(['"]?)(.+?)\1$/, '$2'));
17
if (!/^https?:/.test(urlObj.protocol)) {
18
continue;
19
}
20
} catch (e) {
21
+ continue;
22
- window.setTimeout(() => location.href = url, (parseInt(secs) || 0) * 1000);
23
+ window.setTimeout(() => location.href = urlObj, (parseInt(secs) || 0) * 1000);
24
25
26
0 commit comments