2 Commits
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'; const badge = document.createElement('div'); badge.className='mobile-live-badge'; badge.textContent='LIVE';
item.appendChild(badge); item.appendChild(badge);
} }
item.addEventListener('click', () => openProgramModal(ch, p));
list.appendChild(item); list.appendChild(item);
}); });
section.appendChild(list); container.appendChild(section); 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').textContent = p.desc || '';
document.getElementById('pm-desc').style.display = p.desc ? 'block' : 'none'; 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'); const watchBtn = document.getElementById('pm-watch');
if (isLive) { if (isLive && currentM3uUrl) {
watchBtn.style.display = 'inline-flex'; watchBtn.style.display = 'inline-flex';
watchBtn.onclick = () => { closeProgramModal(); openPip(ch.name, p.title); }; watchBtn.onclick = () => { closeProgramModal(); openPip(ch.name, p.title); };
} else { } else {