Ability to show password when logging in or registering
This commit is contained in:
@@ -56,3 +56,23 @@ passwordConfirm.addEventListener("input", () => {
|
||||
document.getElementById("passwordConfirmNotice").className = "error";
|
||||
}
|
||||
})
|
||||
|
||||
let showPassword = document.getElementById("showPassword");
|
||||
let showConfirmPassword = document.getElementById("showConfirmPassword");
|
||||
showPassword.addEventListener("click", () => {
|
||||
let password = document.getElementById("password");
|
||||
if (showPassword.checked) {
|
||||
password.type = "text";
|
||||
} else {
|
||||
password.type = "password";
|
||||
}
|
||||
})
|
||||
|
||||
showConfirmPassword.addEventListener("click", () => {
|
||||
let password = document.getElementById("passwordConfirm");
|
||||
if (showConfirmPassword.checked) {
|
||||
password.type = "text";
|
||||
} else {
|
||||
password.type = "password";
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user