From 9dec9d571ef57a4657030a5f563876dd6db0536c Mon Sep 17 00:00:00 2001 From: Random-user420 Date: Wed, 25 Sep 2024 18:39:16 +0200 Subject: [PATCH] fix(AlEncr): finnaly disabled autologin on encryped --- autologin.js | 5 +---- init.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/autologin.js b/autologin.js index 623a92c..bcce5c7 100644 --- a/autologin.js +++ b/autologin.js @@ -31,9 +31,9 @@ function set_stored_credentials(username, password, enabled, encrypt) { if (username !== null && username !== undefined && username !== "" && password !== null && password !== undefined && password !== "") { localStorage.setItem("username", username); localStorage.setItem("password", password); + localStorage.setItem("encrypt", encrypt); } localStorage.setItem("enabled", enabled); - localStorage.setItem("encrypt", encrypt); } function get_stored_credentials() { @@ -79,9 +79,6 @@ function login() { if (username_ == null || password_ == null) { return; } - if (getEnrcyptEnabled() === "true" || getEnrcyptEnabled() === true) { - return; - } document.getElementById("UserName").value = username_; document.getElementById("Password").value = password_; sleep(300); diff --git a/init.js b/init.js index a224fc2..4aa1ae8 100644 --- a/init.js +++ b/init.js @@ -35,7 +35,7 @@ window.addEventListener("pageshow", () => { startInfiniteLoop(); }, 600); } - if (urlpath === "/" && get_credentials_enabled() === "true") { + if (urlpath === "/" && get_credentials_enabled() === "true" && (getEnrcyptEnabled() != "true" && getEnrcyptEnabled() != true)) { login(); }