Jalalive

Siaran Langsung Pertandingan

    `, "text/html").body.children.item(0); cache.set($key, $item_el); return $item_el; } })(); if (controller.signal.aborted) break; // 1. 修复 pageYOffset 兼容性(核心) Object.defineProperty(window, "pageYOffset", { get: () => document.documentElement.scrollTop || document.body.scrollTop }); if (controller.signal.aborted) break; if ($item.isTop === 1) { $item_el.classList.add("is_top"); for (const $el of wrapper.children) { if ($el.classList.contains("is_top")) continue; wrapper.insertBefore($item_el, $el); break; } } else wrapper.appendChild($item_el); await new Promise((resolve) => window.setTimeout(resolve, 0, void 0)); if (controller.signal.aborted) break; } return data.length } let start = 0; console.log(wrapper, 'wrapper') start += await render(data.slice(0, end)).then((length) => (wrapper.nextElementSibling.style.setProperty("display", (data.length > (start + length) ? "block" : "none")), length)); controller.signal.addEventListener("abort", () => wrapper.nextElementSibling.style.setProperty("display", "none"), { once: true }); wrapper.nextElementSibling.addEventListener("click", async ($event) => { $event.preventDefault(); start += await render(data.slice(start, start + 200)).then((length) => (wrapper.nextElementSibling.style.setProperty("display", (data.length > (start + length) ? "block" : "none")), length)); }, { signal: controller.signal }); console.timeEnd("update"); loading = false; } /**首次更新 => update() */ const hot_id = [/* */"competition_id=2&sport_id=1",/* */"competition_id=82&sport_id=1",/* */"competition_id=108&sport_id=1",/* */"competition_id=120&sport_id=1",/* */"competition_id=129&sport_id=1",/* */"competition_id=142&sport_id=1",/* */"competition_id=542&sport_id=1",/* */"competition_id=567&sport_id=1",/* */"competition_id=568&sport_id=1",/* */"competition_id=581&sport_id=1",/* */"competition_id=582&sport_id=1",/* */"competition_id=590&sport_id=1",/* */"competition_id=1788&sport_id=1",/* */"competition_id=1&sport_id=2",/* */"competition_id=3&sport_id=2",/* */]; const api_src = new URL("/getMatchListJsonp", location.origin); api_src.searchParams.set("days", "1"); fetch(api_src).then((response) => response.json()).then(({ matchLiveList }) => { const list = []; for (let i = 0; i a.matchTs.getTime() - b.matchTs.getTime()); const contest_all = []; const contest_football = []; const contest_basketball = []; const contest_hot = []; for (let i = 0; i { for (let i = wrapper.children.length - 1; i >= 0; i--) wrapper.removeChild(wrapper.children[i]); const type = item instanceof HTMLElement ? item.getAttribute("data-type") : "0"; for (let i = 0; i v.matchTs.getTime())) + (3.6e+6 * 4); while (list[end] && list[end].matchTs.getTime()

    Konten Terbaru