refactor: split monolithic index.php into src/tpl + src/js modules
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user