blob: f290fda145d9a2388399910caebec38892106a76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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();
|