diff --git a/src/webpage/login.ts b/src/webpage/login.ts index f6b77bf..8b455ca 100644 --- a/src/webpage/login.ts +++ b/src/webpage/login.ts @@ -67,6 +67,17 @@ const instancein = document.getElementById("instancein") as HTMLInputElement; let timeout: ReturnType | string | number | undefined | null = null; // let instanceinfo; +const switchurl = document.getElementById("switch") as HTMLAreaElement; +if (switchurl) { + switchurl.href += window.location.search; + const instance = new URLSearchParams(window.location.search).get("instance"); + console.log(instance); + if (instance) { + instancein.value = instance; + //checkInstance(instance); + } +} + if (instancein) { console.log(instancein); instancein.addEventListener("keydown", () => { @@ -215,16 +226,6 @@ if (!localStorage.getItem("SWMode")) { localStorage.setItem("SWMode", "true"); } -const switchurl = document.getElementById("switch") as HTMLAreaElement; -if (switchurl) { - switchurl.href += window.location.search; - const instance = new URLSearchParams(window.location.search).get("instance"); - console.log(instance); - if (instance) { - instancein.value = instance; - //checkInstance(""); - } -} trimswitcher(); export {adduser};