1(function () { 2 const banners = document.querySelectorAll( 3 '.paragraph--type-moving-banner' 4 ); 5 6 banners.forEach(function (banner) { 7 const bannerLinks = banner.querySelectorAll('a'); 8 const animationObject = banner.querySelector('.moving-stripe'); 9 const button = banner.querySelector('.pause'); 10 11 let paused = false; 12 13 bannerLinks.forEach(function(a) { 14 a.setAttribute( "tabindex", "-1" ); 15 }); 16 17 function pausedState() { 18 if (!paused) { 19 paused = true; 20 animationObject.style.animationPlayState = 'paused'; 21 animationObject.classList.add('paused'); 22 button.classList.remove('pause'); 23 button.classList.add('play'); 24 } else { 25 paused = false; 26 animationObject.style.animationPlayState = 'running'; 27 animationObject.classList.remove('paused') 28 button.classList.remove('play'); 29 button.classList.add('pause'); 30 } 31 } 32 33 button.addEventListener('click', pausedState); 34 }); 35})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.