PageSourceSearch

https://huabio.com/assets/mesa_irs-cb6dd33ac4a790722152d287057e3bb6ec3a324979ca3533aa662f2a1ea2ef0d.js

js huabio.com collected 2026-10-05 21:58:50 UTC 1,212 bytes, 43 lines download raw bytes

1// MESA-IRS 页面:热门 Panel 的 plex 分组切换
2// 图片分组按 index 与 plex 标签一一对应,避免依赖多语言文本匹配
3const PLEX_IMAGE_GROUPS = [
4  ["plex-card-1.png", "plex-card-2.png"],
5  ["plex-card-3.png", "plex-card-4.png"],
6  ["plex-card-5.png"],
7  ["plex-card-6.png"],
8];
9
10(function () {
11  const items = document.querySelectorAll(".plex-item");
12  const imgs = document.querySelectorAll("#plex-cards .plex-card-img");
13
14  function setGroup(index) {
15    items.forEach((el, i) => {
16      el.classList.toggle("active", i === index);
17    });
18
19    const images = PLEX_IMAGE_GROUPS[index] || [];
20    imgs.forEach((img, i) => {
21      const card = img.closest(".plex-card");
22      if (images[i]) {
23        img.src = "/images/pages/mesa_irs/" + images[i];
24        if (card) {
25          card.style.display = "";
26          card.classList.toggle("plex-card--full", images.length === 1);
27        }
28      } else if (card) {
29        card.style.display = "none";
30      }
31    });
32  }
33
34  items.forEach((item) => {
35    item.addEventListener("click", () => {
36      setGroup(Number(item.dataset.index));
37    });
38  });
39
40  if (items.length > 0) {
41    setGroup(Number(items[0].dataset.index));
42  }
43})();

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.