Spaces:
Running
Running
Download script.js from FDxMinh/redbot-manager: direct link, hf CLI and curl.
- Browser
- Download file 837 Bytes
-
https://huggingface.co/spaces/FDxMinh/redbot-manager/resolve/main/script.js
- Command line
-
hf download hf://spaces/FDxMinh/redbot-manager/script.js
-
curl -L -o script.js https://huggingface.co/spaces/FDxMinh/redbot-manager/resolve/main/script.js
837 Bytes
| // Shared JavaScript across all pages | |
| document.addEventListener('DOMContentLoaded', function() { | |
| console.log('RedBot Manager loaded'); | |
| // 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 | |
| const mobileMenuButton = document.getElementById('mobile-menu-button'); | |
| const mobileMenu = document.getElementById('mobile-menu'); | |
| if (mobileMenuButton && mobileMenu) { | |
| mobileMenuButton.addEventListener('click', () => { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| } | |
| }); |