aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/fix-application-receipt.ts
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-03-22 11:54:35 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-03-22 11:54:35 +0530
commitb7b840319aaf37cd48461e7a578cc859454a29e3 (patch)
tree0d5d5d1069c2bb8d9b3b4dd41d2a805e8d07b657 /src/scripts/fix-application-receipt.ts
parent7a6707374f231d9cb07476c9453727ee5c6c9a45 (diff)
downloadbanglar-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.ts21
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();
+}