From e8ed7aa236e301f356c2523b9f5cc0b3afcd789a Mon Sep 17 00:00:00 2001 From: Zoey Date: Sat, 24 Jun 2023 02:29:09 +0200 Subject: [PATCH] Update forms.js Signed-off-by: Zoey --- php/public/forms.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/php/public/forms.js b/php/public/forms.js index b3896469..c3cd3c85 100644 --- a/php/public/forms.js +++ b/php/public/forms.js @@ -39,10 +39,13 @@ document.getElementById('overlay').classList.remove('loading'); } - function mirrorPassword() { + function showPassword() { var Password = document.getElementById("Password"); - var mirroredPassword = document.getElementById("mirroredPassword"); - mirroredPassword.innerText = Password.value; + if (Password.value !== "" && x.type === "password") { + Password.type = "text"; + } else { + Password.type = "password"; + } } function initForm(form) {