diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-03-22 11:54:35 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-03-22 11:54:35 +0530 |
| commit | b7b840319aaf37cd48461e7a578cc859454a29e3 (patch) | |
| tree | 0d5d5d1069c2bb8d9b3b4dd41d2a805e8d07b657 /src/scripts/fix-application-receipt.ts | |
| parent | 7a6707374f231d9cb07476c9453727ee5c6c9a45 (diff) | |
| download | banglar-bhumi-utils-b7b840319aaf37cd48461e7a578cc859454a29e3.tar.gz banglar-bhumi-utils-b7b840319aaf37cd48461e7a578cc859454a29e3.zip | |
Added script for application receipt page.
Diffstat (limited to 'src/scripts/fix-application-receipt.ts')
| -rw-r--r-- | src/scripts/fix-application-receipt.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/scripts/fix-application-receipt.ts b/src/scripts/fix-application-receipt.ts new file mode 100644 index 0000000..11dddf0 --- /dev/null +++ b/src/scripts/fix-application-receipt.ts @@ -0,0 +1,21 @@ +const receiptFormElement = document.querySelector("#form_reprint_request")!; +receiptFormElement.removeAttribute("id"); +receiptFormElement.removeAttribute("name"); +receiptFormElement.removeAttribute("onsubmit"); +receiptFormElement.removeAttribute("target"); +receiptFormElement.removeAttribute("autocomplete"); +receiptFormElement.removeAttribute("rel"); + +let captchaElement = document.querySelector("#werter > div > div:nth-child(4)"); + +if (captchaElement) { + captchaElement = captchaElement!; + const captchaValueElement = document.querySelector("#captchaText") as HTMLInputElement; + const captchaFieldElement = document.querySelector("[name=txtDrawText]") as HTMLInputElement; + const removeCaptcha = () => { + captchaFieldElement.value = captchaValueElement.value; + (captchaElement as any).style.display = "none"; + setTimeout(removeCaptcha, 1000); + }; + removeCaptcha(); +} |
