1(function () { 2 const REFRESH_INTERVAL_MS = 60 * 1000; // 60ç§ãã¨ã«åãã§ã㯠3 let lastKey = ""; 4 let slickInitialized = false; 5 6 function buildActiveSlots() { 7 const now = new Date(); 8 9 return window.mvBannerSlots 10 .filter(slot => { 11 if (slot.permanent) return true; 12 if (!slot.start || !slot.end) return true; 13 14 const start = new Date(slot.start); 15 const end = new Date(slot.end); 16 return now >= start && now <= end; 17 }) 18 .sort((a, b) => (a.permanent ? 999999 : a.priority) - (b.permanent ? 999999 : b.priority)); 19 } 20 21 function rebuild() { 22 const container = document.querySelector(".slick-container"); 23 if (!container) return; 24 25 const active = buildActiveSlots(); 26 const key = active.map(a => a.id).join(","); 27 28 if (key === lastKey && slickInitialized) return; 29 lastKey = key; 30 31 if ($(container).hasClass("slick-initialized")) { 32 $(container).slick("unslick"); 33 } 34 35 container.innerHTML = ""; 36 37 active.forEach(slot => { 38 const div = document.createElement("div"); 39 div.className = "slick-item"; 40 41 div.innerHTML = ` 42 <a href="${slot.link}" ${slot.id ? `id="${slot.id}"` : ""} ${slot.target ? `target="${slot.target}"` : ""}> 43 <div class="mv__bg"> 44 <div class="pc"> 45 <img src="${slot.pc}" alt="${slot.alt || ""}"> 46 </div> 47 <div class="sp"> 48 <img src="${slot.sp}" alt="${slot.alt || ""}"> 49 </div> 50 </div> 51 </a> 52 `; 53 container.appendChild(div); 54 }); 55 56 $(container).slick({ 57 autoplay: true, 58 autoplaySpeed: 5000, 59 arrows: true, 60 dots: true, 61 fade: false, 62 speed: 500, 63 infinite: true 64 }); 65 66 slickInitialized = true; 67 } 68 69 document.addEventListener("DOMContentLoaded", () => { 70 rebuild(); 71 setInterval(rebuild, REFRESH_INTERVAL_MS); 72 }); 73})();
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.