aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/functionality
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-03-24 09:24:15 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-03-24 09:24:15 +0530
commita9f2d88e1e5b1c7ddf524db8b5b185b8485f8d48 (patch)
tree7f39667b6fc56bbf06adbbb3fc2aa6c54cfe27d1 /src/scripts/functionality
parent3b29d138bee5e98c9536d3606de3e4b5378338f0 (diff)
downloadbanglar-bhumi-utils-a9f2d88e1e5b1c7ddf524db8b5b185b8485f8d48.tar.gz
banglar-bhumi-utils-a9f2d88e1e5b1c7ddf524db8b5b185b8485f8d48.zip
Improved some functionality.
Diffstat (limited to 'src/scripts/functionality')
-rw-r--r--src/scripts/functionality/application-receipt.ts21
-rw-r--r--src/scripts/functionality/view-khatian.ts21
2 files changed, 42 insertions, 0 deletions
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();
+}
diff --git a/src/scripts/functionality/view-khatian.ts b/src/scripts/functionality/view-khatian.ts
new file mode 100644
index 0000000..9f35762
--- /dev/null
+++ b/src/scripts/functionality/view-khatian.ts
@@ -0,0 +1,21 @@
+declare function loadKhatian(): void;
+
+document.addEventListener("DOMContentLoaded", () => {
+ const proxiedPost = $.post;
+
+ $.post = function() {
+ if (arguments[0].startsWith("khDetailsAction_LandInfo.action")) {
+ const callback = arguments[2];
+ arguments[2] = (data: any) => {
+ callback(data);
+ const tableElement = document.querySelector("#khdetails > table > tbody > tr > td:nth-child(1) > div:nth-child(5) > table > tbody") as HTMLElement | null;
+ if (tableElement) {
+ tableElement.style.height = "auto";
+ tableElement.style.width = "100%";
+ }
+ }
+ }
+
+ return proxiedPost.apply(this, Array.from(arguments) as any);
+ }
+});