From ca6385bfcb23ae281ba2c2c2d1082cc03e3ab23b Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Sun, 12 Jan 2025 00:25:59 -0600 Subject: [PATCH] login fix --- src/webpage/login.ts | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) 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};