Spaces:
Running
Running
| // main.js - Application Entry Point | |
| import { loadState } from './state.js'; | |
| import { refreshUI } from './ui.js'; | |
| import { attachOneTimeListeners } from './events.js'; | |
| // Initializes the application when the page content is loaded. | |
| function init() { | |
| loadState(); | |
| refreshUI(); | |
| attachOneTimeListeners(); // Attach persistent listeners once | |
| // Trigger fade-in animation for main content | |
| document.querySelector('main').classList.remove('opacity-0'); | |
| } | |
| document.addEventListener('DOMContentLoaded', init); |