Download script.js from blake4john3000/codeverse-chronicles: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/spaces/blake4john3000/codeverse-chronicles/resolve/main/script.js
- Command line
-
hf download hf://spaces/blake4john3000/codeverse-chronicles/script.js
-
curl -L -o script.js https://huggingface.co/spaces/blake4john3000/codeverse-chronicles/resolve/main/script.js
642 Bytes
| // Shared JavaScript functions | |
| document.addEventListener('DOMContentLoaded', () => { | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Mobile menu toggle (will be used in navbar component) | |
| window.toggleMobileMenu = () => { | |
| const menu = document.getElementById('mobile-menu'); | |
| menu.classList.toggle('hidden'); | |
| }; | |
| }); |