aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/functionality/application-receipt.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/functionality/application-receipt.ts')
-rw-r--r--src/scripts/functionality/application-receipt.ts35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/scripts/functionality/application-receipt.ts b/src/scripts/functionality/application-receipt.ts
index 878b910..704d865 100644
--- a/src/scripts/functionality/application-receipt.ts
+++ b/src/scripts/functionality/application-receipt.ts
@@ -1,21 +1,20 @@
-const receiptFormElement = document.getElementById("form_reprint_request") as HTMLElement;
-receiptFormElement.removeAttribute("id");
-receiptFormElement.removeAttribute("name");
-receiptFormElement.removeAttribute("onsubmit");
-receiptFormElement.removeAttribute("target");
-receiptFormElement.removeAttribute("autocomplete");
-receiptFormElement.removeAttribute("rel");
+$("#form_reprint_request")
+ .removeAttr("id")
+ .removeAttr("name")
+ .removeAttr("onsubmit")
+ .removeAttr("target")
+ .removeAttr("autocomplete")
+ .removeAttr("rel");
-let captchaElement = document.querySelector("#werter > div > div:nth-child(4)") as HTMLElement;
+const captchaElement = $("#werter > div > div:nth-child(4)");
-if (captchaElement) {
- captchaElement = captchaElement!;
- const captchaValueElement = document.getElementById("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();
+if (captchaElement.length > 0) {
+ const captchaValueElement = $("#captchaText");
+ const captchaFieldElement = $("[name=txtDrawText]");
+
+ setInterval(() => {
+ captchaFieldElement.val("FFFFFF");
+ captchaValueElement.val("FFFFFF");
+ captchaElement.hide();
+ }, 1000);
}