From 1a301791bb621fa01fa76e9403b23fe1f4a120af Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Sun, 5 Feb 2023 22:57:54 +0530 Subject: Added a more extensive way to automate script development. --- src/scripts/autofill-otps.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/scripts/autofill-otps.ts') 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 || ""; -- cgit v1.2.3