https://high.org/wp-content/themes/icelander-child/assets/js/globa…/videos.js?t=1790849128?ver=1.0.0
1document.addEventListener('DOMContentLoaded', function () { 2 const heroVideos = document.querySelectorAll('video.at-constructor-video'); 3 4 if (heroVideos.length) { 5 for (let videoElement of heroVideos) { 6 setPlayPauseDisplay(videoElement, videoElement.paused); 7 } 8 } 9}); 10 11function toggleAtVideoState (videoId) { 12 const videoElement = document.getElementById(videoId); 13 14 setPlayPauseState(videoElement); 15 setPlayPauseDisplay(videoElement, videoElement.paused); 16} 17 18function getPlayPauseButtons (videoElement) { 19 const pauseElement = videoElement.parentElement.querySelector( 20 '.at-constructor-video-button-wrapper .at-video-controls-pause'); 21 const playElement = videoElement.parentElement.querySelector( 22 '.at-constructor-video-button-wrapper .at-video-controls-play'); 23 24 return { 25 play: playElement, 26 pause: pauseElement, 27 }; 28} 29 30function getButtonElement (videoElement) { 31 return videoElement.parentElement.querySelector( 32 '.at-constructor-video-button-wrapper'); 33} 34 35function setPlayPauseDisplay (videoElement, elementState) { 36 const buttonsControllers = getPlayPauseButtons(videoElement); 37 38 if (elementState) { 39 buttonsControllers.play.style.display = 'inline'; 40 buttonsControllers.pause.style.display = 'none'; 41 } else { 42 buttonsControllers.play.style.display = 'none'; 43 buttonsControllers.pause.style.display = 'inline'; 44 } 45} 46 47function setPlayPauseState (videoElement) { 48 const buttonLabel = 'Background video controller. '; 49 const buttonElement = getButtonElement(videoElement); 50 51 let buttonLabelState = 'Paused.'; 52 53 if (videoElement.paused) { 54 videoElement.play(); 55 buttonLabelState = 'Playing.'; 56 } else { 57 videoElement.pause(); 58 buttonLabelState = 'Paused.'; 59 } 60 61 buttonElement.setAttribute('aria-label', buttonLabel + buttonLabelState); 62}
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.