Песенник

СПУТНИК «ПОЁМ»

Выбирай песню, пой от души — текст всегда под рукой

22 песни
'; h += ''; } else { h += '' + b.l + ''; h += '
' + b.x + '
'; } } return h; } function openSong(id) { var idx = keys.indexOf(id); if (idx === -1) return; currentIdx = idx; var song = D[id]; vTitle.textContent = song.t; if (song.a) { vArtist.textContent = song.a; vArtist.style.display = ""; } else { vArtist.style.display = "none"; } counter.textContent = (idx + 1) + " / " + keys.length; vLyrics.innerHTML = buildLyrics(song); viewer.classList.add("is-open"); viewer.setAttribute("aria-hidden", "false"); viewer.scrollTop = 0; document.body.style.overflow = "hidden"; } function closeSong() { viewer.classList.remove("is-open"); viewer.setAttribute("aria-hidden", "true"); document.body.style.overflow = ""; } for (var i = 0; i < items.length; i++) { items[i].addEventListener("click", function(e) { e.preventDefault(); openSong(this.getAttribute("data-song")); }); } backBtn.addEventListener("click", function() { closeSong(); }); })();