stupidity simulator
This commit is contained in:
parent
07c34a1c4c
commit
78379601f0
1 changed files with 10 additions and 3 deletions
13
site.js
13
site.js
|
@ -37,17 +37,24 @@ async function urlCollector(url, path, file, useLimit) {
|
||||||
u.pathname = h;
|
u.pathname = h;
|
||||||
h = u.toString();
|
h = u.toString();
|
||||||
}
|
}
|
||||||
let h2, h3;
|
let h2;
|
||||||
try {
|
try {
|
||||||
h2 = new URL(h);
|
h2 = new URL(h);
|
||||||
h3 = new URL(h2.origin);
|
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
urls.push(h2.toString())
|
urls.push(h2.toString())
|
||||||
urls.push(h3.toString())
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
let h3;
|
||||||
|
try {
|
||||||
|
h3 = new URL(new URL(url).origin);
|
||||||
|
} catch(err) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
urls.push(h3.toString())
|
||||||
|
|
||||||
return [...new Set(urls)];
|
return [...new Set(urls)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue