From 95becf369822cbb74f4cefb5658f3ff97e164d6e Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:22:41 +0530 Subject: Using jquery for injected codes to maintain consistency. --- src/scripts/login.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/scripts/login.ts') diff --git a/src/scripts/login.ts b/src/scripts/login.ts index 98720de..7bc6118 100644 --- a/src/scripts/login.ts +++ b/src/scripts/login.ts @@ -10,9 +10,9 @@ interceptPost("viewLoginAreaAction", args => { captchaValueElement.val("FFFFFF"); (window as any).DrawLoginCaptcha = () => {}; (window as any).validateLoginCaptcha = () => true; - captchaValueElement.css("display", "none"); - captchaInputElement.css("display", "none"); - $(".captcharefresh").css("display", "none"); + captchaValueElement.hide(); + captchaInputElement.hide(); + $(".captcharefresh").hide(); } }); interceptPost("viewPasswordRecoveryArea", args => { @@ -24,9 +24,9 @@ interceptPost("viewPasswordRecoveryArea", args => { captchaInputElement.val("FFFFFF"); captchaValueElement.val("FFFFFF"); (window as any).Captcha = () => {}; - captchaValueElement.css("display", "none"); - captchaInputElement.css("display", "none"); - $("#captchaRef").css("display", "none"); + captchaValueElement.hide(); + captchaInputElement.hide(); + $("#captchaRef").hide(); } }); interceptPost("login.action", args => { @@ -39,7 +39,7 @@ interceptPost("login.action", args => { callback(data); $("#txtInput").val("FFFFFF"); - $("#beforeLoginDiv").css("display", "none"); + $("#beforeLoginDiv").hide(); $("#afterLoginDiv").css("display", "block"); $("#afterLoginLabel").css("display", "block"); const username = atob(loginData.username.split("RGxycyMxMjM=")[1]); @@ -61,9 +61,9 @@ interceptGet("viewRegistrationAreaAction", args => { const captchaValueElement = $("#regCaptcha"); captchaInputElement.val("FFFFFF"); captchaValueElement.val("FFFFFF"); - $("#registrationForm > div > div:nth-child(5) > div:nth-child(3)").css("display", "none"); - $("#registrationForm > div > div:nth-child(5) > div:nth-child(4)").css("display", "none"); - $("#registrationForm > div > div:nth-child(5) > div:nth-child(5)").css("display", "none"); + $("#registrationForm > div > div:nth-child(5) > div:nth-child(3)").hide(); + $("#registrationForm > div > div:nth-child(5) > div:nth-child(4)").hide(); + $("#registrationForm > div > div:nth-child(5) > div:nth-child(5)").hide(); (window as any).DrawRegistrationCaptcha = () => {}; (window as any).validateRegistrationCaptcha = () => true; } @@ -77,9 +77,9 @@ interceptGet("viewChangePasswordAction", args => { captchaValueElement.val("FFFFFF"); captchaInputElement.val("FFFFFF"); (window as any).DrawLoginCaptcha = () => {}; - captchaValueElement.css("display", "none"); - captchaInputElement.css("display", "none"); - $(".captcharefresh").css("display", "none"); + captchaValueElement.hide(); + captchaInputElement.hide(); + $(".captcharefresh").hide(); } }); -- cgit v1.2.3