Spaces:
Running
Running
Download script.js from enciso7/quantumledger-pro: direct link, hf CLI and curl.
- Browser
- Download file 963 Bytes
-
https://huggingface.co/spaces/enciso7/quantumledger-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/enciso7/quantumledger-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/enciso7/quantumledger-pro/resolve/main/script.js
963 Bytes
| // Toggle dark mode | |
| function toggleDarkMode() { | |
| const html = document.documentElement; | |
| html.classList.toggle('dark'); | |
| localStorage.setItem('darkMode', html.classList.contains('dark')); | |
| // Update charts if they exist | |
| if (window.revenueChart) revenueChart.update(); | |
| if (window.expenseChart) expenseChart.update(); | |
| } | |
| // Initialize dark mode from localStorage | |
| document.addEventListener('DOMContentLoaded', () => { | |
| if (localStorage.getItem('darkMode') === 'true') { | |
| document.documentElement.classList.add('dark'); | |
| } | |
| // Set current year in footer if exists | |
| const yearElement = document.getElementById('currentYear'); | |
| if (yearElement) { | |
| yearElement.textContent = new Date().getFullYear(); | |
| } | |
| }); | |
| // Responsive sidebar toggle for mobile | |
| function toggleSidebar() { | |
| const sidebar = document.querySelector('custom-sidebar'); | |
| if (sidebar) { | |
| sidebar.classList.toggle('hidden'); | |
| } | |
| } |