` } document.addEventListener("DOMContentLoaded", function() { fetch("/api/topsong.json").then((response) => { if (response.ok) { return response.json(); } else { } }).then(e => { if (typeof e[0]['id'] !== 'undefined') { t = "", e.forEach(e => { t += topSongCard(e) }); topsong.innerHTML = topSongHeader + t; var e = [].slice.call(document.querySelectorAll("img.lazy, iframe.lazy")); if ("IntersectionObserver" in window) { let t = new IntersectionObserver(function(e, n) { e.forEach(function(e) { if (e.isIntersecting) { let n = e.target; n.src = n.dataset.src, n.classList.remove("lazy"), t.unobserve(n) } }) }); e.forEach(function(e) { t.observe(e) }) } else e.forEach(function(e, t) { e.src = e.dataset.src, e.classList.remove("lazy") }) } }).catch((error) => { console.log(error); }); });