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/functionality/application-receipt.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/scripts/functionality/application-receipt.ts (limited to 'src/scripts/functionality/application-receipt.ts') diff --git a/src/scripts/functionality/application-receipt.ts b/src/scripts/functionality/application-receipt.ts new file mode 100644 index 0000000..7fdf4d0 --- /dev/null +++ b/src/scripts/functionality/application-receipt.ts @@ -0,0 +1,21 @@ +const receiptFormElement = document.querySelector("#form_reprint_request") as HTMLElement; +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)") as HTMLElement; + +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.style.display = "none"; + setTimeout(removeCaptcha, 1000); + }; + removeCaptcha(); +} -- cgit v1.2.3