Actually fix wrong URLs

This commit is contained in:
foxster-mp4
2023-04-30 11:27:51 -07:00
parent 2456da796d
commit 1c3bb417cc
2 changed files with 6 additions and 11 deletions

View File

@@ -1,10 +1,5 @@
(function main() {
const success = url => {
const host = window.location.host;
var path = window.location.pathname.split("/")[1];
path = path?.trim === "" ? "" : `/${path}`;
window.location.replace(`${host}${path}?source=${url}`
)};
const success = url => window.location.replace(`index.html?source=${url}`);
// If valid source provided
if (urlSearchParams.has('source') && isValidHTTPURL(sourceURL))