Feat: Language support via json files in the locales folder + Feat: Popup with title, channel, schedule, duration, season, episode, synopsis, Watch button (if M3U provided) and IMDb link + Fix: Date added to the timebar

This commit is contained in:
Johnnybegood90
2026-03-12 13:11:49 +01:00
parent 8d223359f4
commit 8826926168
13 changed files with 289 additions and 31 deletions
+4 -6
View File
@@ -12,12 +12,12 @@ function copyUrl(type) {
navigator.clipboard.writeText(url).then(() => {
const btns = document.querySelectorAll('.copy-btn');
btns.forEach(b => { if (b.textContent.toLowerCase() === type) {
b.textContent = '✓ copié';
b.textContent = L.copied;
b.classList.add('copied');
setTimeout(() => { b.textContent = type.toUpperCase(); b.classList.remove('copied'); }, 1800);
}});
}).catch(() => {
prompt('Copiez cette URL :', url);
prompt(url, url);
});
}
function fmtTime(d) { return `${pad(d.getHours())}:${pad(d.getMinutes())}`; }
@@ -36,10 +36,8 @@ function parseXMLTVDate(str) {
function updateClock() {
const now = new Date();
document.getElementById('clock').textContent = fmtTimeFull(now);
const days=['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'];
const months=['Jan','Fév','Mar','Avr','Mai','Jun','Jul','Aoû','Sep','Oct','Nov','Déc'];
document.getElementById('dateLabel').textContent =
`${days[now.getDay()]} ${now.getDate()} ${months[now.getMonth()]} ${now.getFullYear()}`;
`${L.days[now.getDay()]} ${now.getDate()} ${L.months[now.getMonth()]} ${now.getFullYear()}`;
}
setInterval(updateClock, 1000);
updateClock();
@@ -62,7 +60,7 @@ async function loadEPG(url) {
} catch(e) {
document.getElementById('loading').style.display = 'none';
document.getElementById('errorMsg').style.display = 'flex';
document.getElementById('errorDetail').textContent = `Erreur: ${e.message}`;
document.getElementById('errorDetail').textContent = `${L.epg_error_sub} (${e.message})`;
document.getElementById('epgInput').value = url;
}
}