From 3b05a957da053b444eb040c83b66f9f45eaec911 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange Date: Mon, 18 Mar 2024 21:26:02 -0500 Subject: [PATCH] fix this --- views/projects/item/fediverse-madness/scripts/game.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/views/projects/item/fediverse-madness/scripts/game.js b/views/projects/item/fediverse-madness/scripts/game.js index 580ac23..90bcb6c 100644 --- a/views/projects/item/fediverse-madness/scripts/game.js +++ b/views/projects/item/fediverse-madness/scripts/game.js @@ -33,8 +33,6 @@ async function verify() { const instance = el_id_instance.value.replace(/@/gim, ""); el_id_user.value = username; el_id_instance.value = instance; - el_id_submitwhoamiFollowers.disabled = true; - el_id_submitwhoamiFollowing.disabled = true; if (username.length < 1) return null; if (instance.length < 1) return null; let user_req; @@ -44,8 +42,6 @@ async function verify() { return null; } const user_json = await user_req.json(); - el_id_submitwhoamiFollowers.disabled = false; - el_id_submitwhoamiFollowing.disabled = false; if (user_req.ok) return { USER_ID: user_json.id, INSTANCE: instance @@ -55,7 +51,11 @@ async function verify() { el_id_submitwhoamiFollowers.addEventListener("click", async (e) => { el_id_errorwhoami.innerHTML = ""; + el_id_submitwhoamiFollowers.disabled = true; + el_id_submitwhoamiFollowing.disabled = true; const result = await verify(); + el_id_submitwhoamiFollowers.disabled = false; + el_id_submitwhoamiFollowing.disabled = false; if (result == null) { el_id_errorwhoami.innerHTML = "Invalid user!"; return false;