From a9f2d88e1e5b1c7ddf524db8b5b185b8485f8d48 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Fri, 24 Mar 2023 09:24:15 +0530 Subject: Improved some functionality. --- src/scripts/autofill-captcha.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/scripts/autofill-captcha.ts (limited to 'src/scripts/autofill-captcha.ts') diff --git a/src/scripts/autofill-captcha.ts b/src/scripts/autofill-captcha.ts deleted file mode 100644 index f290fda..0000000 --- a/src/scripts/autofill-captcha.ts +++ /dev/null @@ -1,28 +0,0 @@ -const autofillCaptcha = () => { - let captchas = Array.from(document.querySelectorAll("#txtCaptcha")) as HTMLInputElement[]; - - for (const captcha of captchas) { - const captchaInput = captcha.parentElement!.querySelector("#txtInput") as HTMLInputElement | null; - if (captchaInput) { - captchaInput.value = captcha.value.replaceAll(" ", ""); - captchaInput.style.display = "none"; - captcha.style.display = "none"; - } - } - - captchas = Array.from(document.querySelectorAll("#captchaText")) as HTMLInputElement[]; - for (const captcha of captchas) { - const captchaParentElement = captcha.parentElement!; - if (captchaParentElement.id === "drawTextSpan") { - const captchaInput = captchaParentElement.parentElement!.querySelector("#drawText1") as HTMLInputElement | null; - if (captchaInput) { - captchaInput.value = captcha.value.replaceAll(" ", ""); - captchaParentElement.parentElement!.style.display = "none"; - } - } - } - - setTimeout(autofillCaptcha, 1000); -}; - -autofillCaptcha(); -- cgit v1.2.3