This commit is contained in:
MeowcaTheoRange 2024-03-18 21:26:02 -05:00
parent e0f1a59d86
commit 3b05a957da

View file

@ -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;