1function startCountdown(deadline) { 2 // Wall-clock values from CMS are interpreted in the visitor's local timezone. 3 const targetDate = new Date( 4 deadline.year, 5 deadline.month - 1, 6 deadline.day, 7 deadline.hour, 8 deadline.minute, 9 deadline.second 10 ).getTime(); 11 12 let countdownInterval; 13 14 function updateCountdown() { 15 const now = Date.now(); 16 const timeLeft = targetDate - now; 17 18 if (timeLeft < 0) { 19 document.getElementById("days").textContent = "00"; 20 document.getElementById("hours").textContent = "00"; 21 document.getElementById("minutes").textContent = "00"; 22 clearInterval(countdownInterval); // This now works because it's defined 23 return; 24 } 25 26 const days = Math.floor(timeLeft / (1000 * 60 * 60 * 24)); 27 const hours = Math.floor((timeLeft % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); 28 const minutes = Math.floor((timeLeft % (1000 * 60 * 60)) / (1000 * 60)); 29 30 document.getElementById("days").textContent = days < 10 ? "0" + days : days; 31 document.getElementById("hours").textContent = hours < 10 ? "0" + hours : hours; 32 document.getElementById("minutes").textContent = minutes < 10 ? "0" + minutes : minutes; 33 } 34 35 countdownInterval = setInterval(updateCountdown, 1000); 36 updateCountdown(); 37} 38 39function loadVideo() { 40 const videos = document.querySelectorAll("video"); 41 42 const observer = new IntersectionObserver((entries, obs) => { 43 entries.forEach(entry => { 44 if (entry.isIntersecting) { 45 const video = entry.target; 46 const source = video.querySelector("source"); 47 48 if (source.dataset.src) { 49 source.src = source.dataset.src; 50 video.load(); 51 video.play(); // start playing when visible 52 source.removeAttribute("data-src"); 53 } 54 55 obs.unobserve(video); // stop observing once loaded 56 } 57 }); 58 }, { threshold: 0.25 }); // load when 25% visible 59 60 videos.forEach(video => observer.observe(video)); 61}
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.