refactor: split monolithic index.php into src/tpl + src/js modules

This commit is contained in:
Johnnybegood90
2026-03-11 23:47:22 +01:00
parent 2b163be684
commit 0be8c34b31
17 changed files with 1526 additions and 1517 deletions
+20
View File
@@ -0,0 +1,20 @@
// ── THÈMES ────────────────────────────────────────────────────────────────────
function setTheme(theme) {
document.getElementById('themeStylesheet').href = 'themes/' + theme + '.css';
localStorage.setItem('gridtv-theme', theme);
document.getElementById('themeSelect').value = theme;
}
function initTheme() {
const saved = localStorage.getItem('gridtv-theme') || 'default';
setTheme(saved);
}
initTheme();
// ── LIVE UPDATES ──────────────────────────────────────────────────────────────
function startLiveUpdates() {
setInterval(() => { if (!isMobile()) positionNowLine(); }, 30000);
setInterval(() => { if (channels.length) renderAll(); }, 60000);
setInterval(() => loadEPG(DEFAULT_EPG_URL), 30*60*1000);
}