From 8a9a6b6aaeb42805bf36fc5aacf6ce97afbe1f33 Mon Sep 17 00:00:00 2001 From: firefuture Date: Sun, 29 Sep 2024 20:11:18 -0500 Subject: [PATCH] Made the 'show password' button work --- static/login.html | 7 ++++--- static/login.js | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 static/login.js diff --git a/static/login.html b/static/login.html index 1446f54..3a415ba 100644 --- a/static/login.html +++ b/static/login.html @@ -13,15 +13,15 @@
- +
We'll never share your email with anyone else.
- +
- +
@@ -30,5 +30,6 @@
+ diff --git a/static/login.js b/static/login.js new file mode 100644 index 0000000..9e9cb15 --- /dev/null +++ b/static/login.js @@ -0,0 +1,15 @@ +const email = document.getElementById("email"); +const emailHelp = document.getElementById("emailHelp"); +const emailRegex = /^[^\s@]+@my\.utsa\.edu$/; +const password = document.getElementById("password"); +const passwordHelp = document.getElementById("passwordHelp"); +const passwordRegex = /^.{8,}$/; + +function showPass(){ + if(password.type === "password"){ + password.type = "text"; + } + else{ + password.type = "password"; + } +}