|
@@ -17,6 +17,23 @@ async function fai () {
|
|
|
console.log('src', srcEl, url)
|
|
|
audioEl.appendChild(srcEl)
|
|
|
})
|
|
|
+
|
|
|
+ const showList = document.querySelector('#shows > ul')
|
|
|
+ for (const show of radio.getShows()) {
|
|
|
+ const item = document.createElement('li')
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.dataset['show'] = show.getName()
|
|
|
+ link.textContent = show.getName()
|
|
|
+ link.setAttribute('href', show.getWebsite())
|
|
|
+ item.appendChild(link)
|
|
|
+ showList.appendChild(item)
|
|
|
+ }
|
|
|
+ showList.addEventListener('mouseenter', function (evt) {
|
|
|
+ if (evt.target.dataset['show'] === undefined)
|
|
|
+ return;
|
|
|
+ const info = document.querySelector('#show-info')
|
|
|
+ info.textContent = radio.getShowByName(evt.target.dataset['show']).getFeed()
|
|
|
+ }, true)
|
|
|
}
|
|
|
|
|
|
fai()
|