aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/captcha.ts3
-rw-r--r--src/scripts/functionality/view-khatian.ts1
-rw-r--r--src/scripts/login.ts1
-rw-r--r--src/scripts/optimize.ts22
-rw-r--r--src/scripts/stop-blocking.ts2
5 files changed, 26 insertions, 3 deletions
diff --git a/src/scripts/captcha.ts b/src/scripts/captcha.ts
index 0eb36c9..453443c 100644
--- a/src/scripts/captcha.ts
+++ b/src/scripts/captcha.ts
@@ -1,9 +1,12 @@
const autofillCaptcha = () => {
const captchas = Array.from(document.querySelectorAll("#captchaText")) as HTMLInputElement[];
+
for (const captcha of captchas) {
const captchaParentElement = captcha.parentElement!;
+
if (captchaParentElement.id === "drawTextSpan") {
const captchaInput = captchaParentElement.parentElement!.querySelector("#drawText1") as HTMLInputElement | null;
+
if (captchaInput) {
captchaInput.value = captcha.value.replaceAll(" ", "");
captchaParentElement.parentElement!.style.display = "none";
diff --git a/src/scripts/functionality/view-khatian.ts b/src/scripts/functionality/view-khatian.ts
index 9f35762..e1d3831 100644
--- a/src/scripts/functionality/view-khatian.ts
+++ b/src/scripts/functionality/view-khatian.ts
@@ -9,6 +9,7 @@ document.addEventListener("DOMContentLoaded", () => {
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%";
diff --git a/src/scripts/login.ts b/src/scripts/login.ts
index e2d5d5b..390131c 100644
--- a/src/scripts/login.ts
+++ b/src/scripts/login.ts
@@ -36,6 +36,7 @@ document.addEventListener("DOMContentLoaded", () => {
if (!data.exception && data.checkmsg === "success") {
loginData = arguments[1];
}
+
callback(data);
};
}
diff --git a/src/scripts/optimize.ts b/src/scripts/optimize.ts
index c8125ee..55492b6 100644
--- a/src/scripts/optimize.ts
+++ b/src/scripts/optimize.ts
@@ -1,7 +1,23 @@
import { modifyDOM } from "@/shared/modify-dom";
modifyDOM([
- ["head > script:nth-child(34)", { src: null }],
- ["head > script:nth-child(36)", { src: null, innerHTML: "$.prototype.nivoSlider = () => {};" }],
- ["head > script:nth-child(43)", { src: null }]
+ [
+ "head > script:nth-child(34)",
+ {
+ src: null
+ }
+ ],
+ [
+ "head > script:nth-child(36)",
+ {
+ src: null,
+ innerHTML: "$.prototype.nivoSlider = () => {};"
+ }
+ ],
+ [
+ "head > script:nth-child(43)",
+ {
+ src: null
+ }
+ ]
]);
diff --git a/src/scripts/stop-blocking.ts b/src/scripts/stop-blocking.ts
index 57357f8..f418f66 100644
--- a/src/scripts/stop-blocking.ts
+++ b/src/scripts/stop-blocking.ts
@@ -4,6 +4,7 @@ $.prototype.bind = function() {
if (arguments[0].trim() === "cut copy paste") {
arguments[1] = (e: any) => {};
}
+
return proxiedBind.apply(this, Array.from(arguments) as any);
}
@@ -11,6 +12,7 @@ const proxiedKeydown = $.prototype.keydown;
$.prototype.keydown = function() {
arguments[0] = (e: any) => true;
+
return proxiedKeydown.apply(this, Array.from(arguments) as any);
}