Hotfix: Modal wasn't working on mobile + Watch button was shown even without M3U.

This commit is contained in:
Johnnybegood90
2026-03-12 14:15:42 +01:00
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -49,6 +49,7 @@ function renderMobile() {
const badge = document.createElement('div'); badge.className='mobile-live-badge'; badge.textContent='LIVE';
item.appendChild(badge);
}
item.addEventListener('click', () => openProgramModal(ch, p));
list.appendChild(item);
});
section.appendChild(list); container.appendChild(section);
+2 -2
View File
@@ -13,9 +13,9 @@ function openProgramModal(ch, p) {
document.getElementById('pm-desc').textContent = p.desc || '';
document.getElementById('pm-desc').style.display = p.desc ? 'block' : 'none';
// Bouton Watch now — seulement si live
// Bouton Watch now — seulement si live ET M3U fourni pour la source active
const watchBtn = document.getElementById('pm-watch');
if (isLive) {
if (isLive && currentM3uUrl) {
watchBtn.style.display = 'inline-flex';
watchBtn.onclick = () => { closeProgramModal(); openPip(ch.name, p.title); };
} else {