diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/images/eye.png b/images/eye.png new file mode 100644 index 0000000..8fc0441 Binary files /dev/null and b/images/eye.png differ diff --git a/images/eye2.png b/images/eye2.png new file mode 100644 index 0000000..7e55bd5 Binary files /dev/null and b/images/eye2.png differ diff --git a/index.html b/index.html old mode 100644 new mode 100755 index 1a94466..f4010a1 --- a/index.html +++ b/index.html @@ -44,10 +44,12 @@



+

- - + +
+



diff --git a/main.js b/main.js old mode 100644 new mode 100755 index d356c67..d3ad749 --- a/main.js +++ b/main.js @@ -2,6 +2,18 @@ const DEFAULT_USER = "defaultUser"; const DEFAULT_SESSION = "defaultSession"; const DEFAULT_WALLPAPPER = "defaultWallpapper"; +function togglePasswordVisibility() { + var passwd = document.getElementById("password"); + var eye = document.getElementById("eye"); + if (passwd.type === "password") { + passwd.type = "text"; + eye.src = "images/eye2.png" + } else { + passwd.type = "password"; + eye.src = "images/eye.png" + } +} + function updateDefaults(user, session) { localStorage.setItem(DEFAULT_USER, user) @@ -34,6 +46,7 @@ function selectItemByValue(elmnt, value){ } function doLogin() { + event.preventDefault(); var user = document.getElementById("user").textContent var password = document.getElementById("password").value var session = document.getElementById("sessions").value diff --git a/style.css b/style.css old mode 100644 new mode 100755