From 6f6c263a072c9df4e826d8ebb2035c82a87be7e0 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Mon, 13 Jul 2026 20:49:57 +0530 Subject: refactor: organised the scripts into a more well defined structure now all scripts that are common to all pages lie in src/scripts/common each page gets its own folder in src/pages and different parts of the page's configuration are separated in separated folders which are all finally imported in src/pages/*/index.ts --- .../download-information-pdf-page-content.html | 241 +++++++++++++++++++++ src/scripts/pages/view-khatian/index.ts | 95 ++++++++ 2 files changed, 336 insertions(+) create mode 100644 src/scripts/pages/view-khatian/download-information-pdf-page-content.html create mode 100644 src/scripts/pages/view-khatian/index.ts (limited to 'src/scripts/pages/view-khatian') diff --git a/src/scripts/pages/view-khatian/download-information-pdf-page-content.html b/src/scripts/pages/view-khatian/download-information-pdf-page-content.html new file mode 100644 index 0000000..129608e --- /dev/null +++ b/src/scripts/pages/view-khatian/download-information-pdf-page-content.html @@ -0,0 +1,241 @@ +
+ + + +
$details$
+ +
diff --git a/src/scripts/pages/view-khatian/index.ts b/src/scripts/pages/view-khatian/index.ts new file mode 100644 index 0000000..0be0c52 --- /dev/null +++ b/src/scripts/pages/view-khatian/index.ts @@ -0,0 +1,95 @@ +import { generateWebPage } from "@/shared/generate-web-page"; +import { interceptPost } from "@/shared/intercept-jquery-ajax"; +import getDownloadInformationPDFPageContent from "@/scripts/pages/view-khatian/download-information-pdf-page-content.html"; + +const submitButtonElement = $("#khbutton"); +const separatorElement = $("#bodycover > div > form > hr:nth-child(2)"); +const formElement = $("#bodycover > div > form"); +let downloadPDFButton: JQuery | null = null; + +const submitButtonElementComputedStyles = window.getComputedStyle(submitButtonElement[0]); +const styles = Array.from(submitButtonElementComputedStyles) + .reduce( + (str, property) => `${str}${property}:${submitButtonElementComputedStyles.getPropertyValue(property)};`, + "" + ); + +/** + * Reads the currently selected text from a `