Spaces:
Running
Running
Download script.js from RAHIM190/mystic-void-explorer: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/spaces/RAHIM190/mystic-void-explorer/resolve/main/script.js
- Command line
-
hf download hf://spaces/RAHIM190/mystic-void-explorer/script.js
-
curl -L -o script.js https://huggingface.co/spaces/RAHIM190/mystic-void-explorer/resolve/main/script.js
796 Bytes
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize animations | |
| const animateElements = document.querySelectorAll('.fade-in'); | |
| animateElements.forEach((el, index) => { | |
| el.style.animationDelay = `${index * 0.1}s`; | |
| }); | |
| // Theme toggle functionality | |
| const themeToggle = document.getElementById('theme-toggle'); | |
| if (themeToggle) { | |
| themeToggle.addEventListener('click', () => { | |
| document.documentElement.classList.toggle('dark'); | |
| localStorage.setItem('theme', document.documentElement.classList.contains('dark') ? 'dark' : 'light'); | |
| }); | |
| } | |
| // Check for saved theme preference | |
| if (localStorage.getItem('theme') === 'light') { | |
| document.documentElement.classList.remove('dark'); | |
| } | |
| }); |