(function () { function init() { var t = document.querySelector('.ytph-marquee .ytph-m-track'); if (!t || !('IntersectionObserver' in window)) return; var s = document.querySelector('.ytph-marquee'); new IntersectionObserver(function (e) { e.forEach(function (x) { t.style.animationPlayState = x.isIntersecting ? 'running' : 'paused'; }); }, { rootMargin: '50px' }).observe(s); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })();