Spaces:
Running
Running
Download script.js from ufocoder/serenecampus-haven: direct link, hf CLI and curl.
- Browser
- Download file 795 Bytes
-
https://huggingface.co/spaces/ufocoder/serenecampus-haven/resolve/main/script.js
- Command line
-
hf download hf://spaces/ufocoder/serenecampus-haven/script.js
-
curl -L -o script.js https://huggingface.co/spaces/ufocoder/serenecampus-haven/resolve/main/script.js
795 Bytes
| // YEAR IN FOOTER | |
| document.getElementById('year').textContent = new Date().getFullYear(); | |
| // DEMO MODAL | |
| const playBtn = document.getElementById('playBtn'); | |
| const modal = document.getElementById('demoModal'); | |
| const closeModal = document.getElementById('closeModal'); | |
| playBtn?.addEventListener('click', () => modal.classList.remove('hidden')); | |
| closeModal?.addEventListener('click', () => modal.classList.add('hidden')); | |
| modal?.addEventListener('click', e => { | |
| if (e.target === modal) modal.classList.add('hidden'); | |
| }); | |
| // WAITLIST FORM FAKE SUBMIT | |
| document.getElementById('waitlistForm')?.addEventListener('submit', e => { | |
| e.preventDefault(); | |
| const email = e.target.email.value; | |
| alert(`π Thanks! We saved ${email}. We'll ping you when CampusMind doors open.`); | |
| e.target.reset(); | |
| }); |