diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-06-14 01:47:48 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-06-14 01:47:48 +0530 |
| commit | b4169b8a4ec4f5fda7ceab8f197ac73d0743c49b (patch) | |
| tree | 941532e7c950108bb191e2df96b9db2fd90aef64 | |
| parent | ca20de409d08ec5abe2d3275bb97cfc5e8c164b3 (diff) | |
| download | banglar-bhumi-utils-b4169b8a4ec4f5fda7ceab8f197ac73d0743c49b.tar.gz banglar-bhumi-utils-b4169b8a4ec4f5fda7ceab8f197ac73d0743c49b.zip | |
Removing OTP autofill as it is not possible anymore.
| -rw-r--r-- | src/scripts.json | 3 | ||||
| -rw-r--r-- | src/scripts/otps/grievance-application.ts | 6 | ||||
| -rw-r--r-- | src/scripts/otps/mutation-application.ts | 6 | ||||
| -rw-r--r-- | src/scripts/otps/warish-application.ts | 6 | ||||
| -rw-r--r-- | src/shared/autofill-otp.ts | 31 |
5 files changed, 0 insertions, 52 deletions
diff --git a/src/scripts.json b/src/scripts.json index 715ad4d..4517408 100644 --- a/src/scripts.json +++ b/src/scripts.json @@ -1,9 +1,6 @@ { "injected": { "stop-blocking.ts": "*", - "otps/grievance-application.ts": "GrievAppViewAction.action", - "otps/mutation-application.ts": "MuteApplication.action", - "otps/warish-application.ts": "WarishAppViewAction.action", "functionality/mutation-application.ts": "MuteApplication.action", "functionality/view-khatian/index.ts": "KnowYourProperty.action", "captcha/know-your-property.ts": "KnowYourProperty.action", diff --git a/src/scripts/otps/grievance-application.ts b/src/scripts/otps/grievance-application.ts deleted file mode 100644 index 10d38ef..0000000 --- a/src/scripts/otps/grievance-application.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { addAutofillOtps } from "@/shared/autofill-otp"; - -addAutofillOtps([ - ["MISPetitionSmsSend.action", "input[name=mobile_Code]"], - ["MISPetitionEmailSend.action", "input[name=txtemail_Code]"] -]); diff --git a/src/scripts/otps/mutation-application.ts b/src/scripts/otps/mutation-application.ts deleted file mode 100644 index ecf6aaa..0000000 --- a/src/scripts/otps/mutation-application.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { addAutofillOtps } from "@/shared/autofill-otp"; - -addAutofillOtps([ - ["muteSmsSend.action", "#mobile_CodeMute"], - ["muteEmailSend.action", "#txtemail_CodeMute"] -]); diff --git a/src/scripts/otps/warish-application.ts b/src/scripts/otps/warish-application.ts deleted file mode 100644 index 948d3fb..0000000 --- a/src/scripts/otps/warish-application.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { addAutofillOtps } from "@/shared/autofill-otp"; - -addAutofillOtps([ - ["wrshSmsSend.action", "#mobile_CodeWaris"], - ["wrshEmailSend.action", "#txtemail_CodePredecesr"] -]); diff --git a/src/shared/autofill-otp.ts b/src/shared/autofill-otp.ts deleted file mode 100644 index b359cb4..0000000 --- a/src/shared/autofill-otp.ts +++ /dev/null @@ -1,31 +0,0 @@ -type AutofillOTPRule = readonly [string, string] - -let otpAutofillList: AutofillOTPRule[] = []; - -document.addEventListener("DOMContentLoaded", () => { - const proxiedPost = $.post; - - $.post = function() { - for (const rule of otpAutofillList) { - if (arguments[0].endsWith(rule[0])) { - const element: HTMLInputElement | null = document.querySelector(rule[1]) as HTMLInputElement | null; - - if (element) { - const callback = arguments[2]; - arguments[2] = (data: any) => { - element!.value = data?.messageShow || ""; - callback(data); - }; - } - - break; - } - } - - return proxiedPost.apply(this, Array.from(arguments) as any); - }; -}); - -export const addAutofillOtps = (addedOTPAutofillList: readonly AutofillOTPRule[]) => { - otpAutofillList = otpAutofillList.concat(addedOTPAutofillList); -}; |
