// Depends on: all other modules (loaded before this file) /** * Guard: only run when loaded as the actual dashboard page. */ if (!document.getElementById('page-dashboard') && !document.querySelector('.sidebar-logo')) { throw new Error('dashboard scripts loaded outside dashboard context — aborting'); } async function init() { log('Dashboard initializing…'); try { const manifest = chrome.runtime.getManifest(); const versionEl = $('sidebarVersion'); if (versionEl && manifest.version) { versionEl.textContent = 'v' + manifest.version + ' · hole.sail'; } } catch (_) {} setupNavigation(); setupEvents(); setupCertValidator(); setupSshEvents(); setupRdpEvents(); setupBackupEvents(); await refresh(); setInterval(refresh, 2000); } init();