Spaces:
Running
Running
Download script.js from code0zero/crewcontrol-dashboard: direct link, hf CLI and curl.
- Browser
- Download file 766 Bytes
-
https://huggingface.co/spaces/code0zero/crewcontrol-dashboard/resolve/main/script.js
- Command line
-
hf download hf://spaces/code0zero/crewcontrol-dashboard/script.js
-
curl -L -o script.js https://huggingface.co/spaces/code0zero/crewcontrol-dashboard/resolve/main/script.js
766 Bytes
| document.addEventListener('DOMContentLoaded', () => { | |
| // Set active menu item based on current page | |
| const currentPage = window.location.pathname.split('/').pop() || 'index.html'; | |
| const menuItems = document.querySelectorAll('custom-sidebar a.menu-item'); | |
| menuItems.forEach(item => { | |
| const href = item.getAttribute('href'); | |
| if (currentPage === href) { | |
| item.classList.add('active'); | |
| } else { | |
| item.classList.remove('active'); | |
| } | |
| }); | |
| // Initialize tooltips | |
| const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); | |
| tooltipTriggerList.map(function (tooltipTriggerEl) { | |
| return new bootstrap.Tooltip(tooltipTriggerEl); | |
| }); | |
| }); | |