Download script.js from mathan14151/aj-studioz-secureauth-wizardry: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/spaces/mathan14151/aj-studioz-secureauth-wizardry/resolve/main/script.js
- Command line
-
hf download hf://spaces/mathan14151/aj-studioz-secureauth-wizardry/script.js
-
curl -L -o script.js https://huggingface.co/spaces/mathan14151/aj-studioz-secureauth-wizardry/resolve/main/script.js
1.56 kB
| document.addEventListener('DOMContentLoaded', function() { | |
| // Password visibility toggle | |
| const togglePassword = document.querySelector('#togglePassword'); | |
| const password = document.querySelector('#password'); | |
| togglePassword.addEventListener('click', function() { | |
| const icon = this.querySelector('i'); | |
| const type = password.getAttribute('type') === 'password' ? 'text' : 'password'; | |
| password.setAttribute('type', type); | |
| // Toggle eye icon | |
| if (type === 'password') { | |
| icon.setAttribute('data-feather', 'eye'); | |
| } else { | |
| icon.setAttribute('data-feather', 'eye-off'); | |
| } | |
| feather.replace(); | |
| }); | |
| // Form submission | |
| const form = document.querySelector('form'); | |
| form.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Simple validation | |
| const email = document.getElementById('email').value; | |
| const password = document.getElementById('password').value; | |
| if (!email || !password) { | |
| alert('Please fill in all fields'); | |
| return; | |
| } | |
| // Here you would typically make an API call | |
| console.log('Login attempt with:', { email, password }); | |
| // Simulate successful login with branded message | |
| setTimeout(() => { | |
| alert('✨ Welcome to AJ Studioz! ✨\nAccess granted to creative wonderland!'); | |
| // window.location.href = '/dashboard'; // Uncomment for real redirect | |
| }, 1000); | |
| }); | |
| }); |