MCPcopy Create free account
hub / github.com/cppla/ServerStatus / bindTabs

Function bindTabs

web/js/app.js:536–546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534}
535
536function bindTabs(){
537 $('navTabs').addEventListener('click', e => {
538 if(e.target.tagName !== 'BUTTON') return;
539 const tab = e.target.dataset.tab;
540 S.activeTab = tab;
541 document.querySelectorAll('.nav button').forEach(btn => btn.classList.toggle('active', btn === e.target));
542 document.querySelectorAll('.panel').forEach(panel => panel.classList.toggle('active', panel.id === 'panel-' + tab));
543 $('serversToolbar').style.display = tab === 'servers' ? 'flex' : 'none';
544 if(tab === 'config') ensureAdminChecked();
545 });
546}
547function bindTheme(){
548 const btn = $('themeToggle');
549 const mql = window.matchMedia('(prefers-color-scheme: light)');

Callers 1

app.jsFile · 0.85

Calls 2

$Function · 0.85
ensureAdminCheckedFunction · 0.85

Tested by

no test coverage detected