aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/autofill-otps.ts
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-02-05 22:57:54 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-02-05 22:57:54 +0530
commit1a301791bb621fa01fa76e9403b23fe1f4a120af (patch)
treeebfff3e1b7c366c738750644f4fdefaa4fef21b7 /src/scripts/autofill-otps.ts
parentc690f47a786eef27900873ac9fe75134995f156a (diff)
downloadbanglar-bhumi-utils-1a301791bb621fa01fa76e9403b23fe1f4a120af.tar.gz
banglar-bhumi-utils-1a301791bb621fa01fa76e9403b23fe1f4a120af.zip
Added a more extensive way to automate script development.
Diffstat (limited to 'src/scripts/autofill-otps.ts')
-rw-r--r--src/scripts/autofill-otps.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scripts/autofill-otps.ts b/src/scripts/autofill-otps.ts
index f299540..e34be8c 100644
--- a/src/scripts/autofill-otps.ts
+++ b/src/scripts/autofill-otps.ts
@@ -1,6 +1,7 @@
const proxiedPost = $.post;
$.post = function() {
+ console.log(arguments);
let element: HTMLInputElement | null = null;
if (arguments[0].endsWith("MISPetitionSmsSend.action")) {
element = document.querySelector("input[name=mobile_Code]") as HTMLInputElement;
@@ -8,7 +9,7 @@ $.post = function() {
element = document.querySelector("input[name=txtemail_Code]") as HTMLInputElement;
}
- if (element !== null) {
+ if (element) {
const callback = arguments[2];
arguments[2] = (data: any) => {
element!.value = data?.messageShow || "";