diff --git a/pass.html b/pass.html index 8edf7431..c19bdef7 100644 --- a/pass.html +++ b/pass.html @@ -9,12 +9,7 @@ - - + diff --git a/pass.js b/pass.js index d69d08d8..0d22fd0c 100644 --- a/pass.js +++ b/pass.js @@ -1,3 +1,25 @@ +document.addEventListener('DOMContentLoaded', () => { + const textInput = document.getElementById('text_input'); + const hiddenInput = document.querySelector('.password.hidden'); + const handle = document.querySelector('.handle'); + const correctPassword = "Credits"; // Replace with the actual correct password + + handle.addEventListener('click', () => { + if (textInput.type === 'text') { + textInput.type = 'password'; + hiddenInput.type = 'text'; + } else { + textInput.type = 'text'; + hiddenInput.type = 'password'; + } + }); + + textInput.addEventListener('input', () => { + if (textInput.value === correctPassword) { + window.location.href = "credits.html"; // Replace with the actual file to navigate to + } + }); +}); const text = document.querySelector('input.password.visible'); const pass = document.querySelector('input.password.hidden'); const handle = document.querySelector('img.handle');