diff --git a/site.js b/site.js index 6ff8727..1b7112e 100644 --- a/site.js +++ b/site.js @@ -34,14 +34,15 @@ async function urlCollector(url, path, file, useLimit) { u.pathname = h; h = u.toString(); } - let h2; + let h2, h3; try { h2 = new URL(h); + h3 = new URL(h2.origin); } catch(err) { return; } urls.push(h2.toString()) - urls.push(new URL(h2.origin).toString()) + urls.push(h3.toString()) }) return [...new Set(urls)];