diff options
Diffstat (limited to 'src/scripts/captcha.ts')
| -rw-r--r-- | src/scripts/captcha.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/scripts/captcha.ts b/src/scripts/captcha.ts new file mode 100644 index 0000000..0eb36c9 --- /dev/null +++ b/src/scripts/captcha.ts @@ -0,0 +1,17 @@ +const autofillCaptcha = () => { + const 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(); |
