<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">let subdom = "tkdh" + (new Date().getDay() + 1).toString() + new Date().getHours().toString();
var navi = [
  {
    title: "å½©è‰²å½©ç¥¨",
    alias: "col",
    url: "list.html",
    icon: "./assets/images/navico1.png",
  },
  {
    title: "é»‘ç™½å½©ç¥¨",
    alias: "black",
    url: "list.html",
    icon: "./assets/images/navico2.png",
  },
  {
    title: "æ¾³é—¨å¼€å¥–",
    alias: "193844",
    url: `https://${subdom}.2hhk7oi7p.cc`,
    icon: "./assets/images/navico3.png",
  },
  {
    title: "æ¸¯å½©å¼€å¥–",
    alias: "1313",
    url: `https://${subdom}.2233kj.com`,
    icon: "./assets/images/navico4.png",
  },
  {
    title: "é«˜æ‰‹èµ„æ–™",
    alias: "tkdh",
    url: `https://${subdom}.dbrpgfiu7.cc/#/pages/forum/find`,
    icon: "./assets/images/navico5.png",
  },
];

var myData = {
  col: [],
  black: [],
};
var imgLoad = "col";
var iSearch = false;
var searchContent = null;
var page = 1;
var pageLoadContent = "home";
var currentNoInfo = {}

var pageData = function (data, limit, page = 1) {
  const offset = (page - 1) * limit;
  return data.slice(offset, offset + limit);
};

const getMeta = (url, cb) =&gt; {
  const img = new Image();
  img.onload = () =&gt; cb(null, img);
  img.onerror = (err) =&gt; cb(err);
  img.src = url;
};

var MyImage = function (options) {
  this.init(options);
};

MyImage.prototype = {
  init: function (options) {
    this.getJsonKj();
    this.data = {
      col: [],
      black: [],
    };
    pageLoadContent = options.pageLoad;
    this.search = false;
    this.searchContent = "";
    this.picData();
    this.methods();
  },
  mAjax: async function (url, callback, fnCallback) {
    var xhr = new XMLHttpRequest();
    xhr.onreadystatechange = () =&gt; {
      if (xhr.readyState == XMLHttpRequest.DONE) {
        callback(xhr.response, fnCallback);
      }
    };
    xhr.open("GET", url, true);
    xhr.setRequestHeader("Content-Type", "application/json");
    xhr.send("");
  },
  getJsonKj: function () {
    let url = "https://kj.tpxiaoshimei.com/hk_kj.json?"+new Date().getTime();
    this.mAjax(url, this.currentNoInfo);
  },
  currentNoInfo: function (data) {
    data = JSON.parse(data);
    let kj = data.k.split(",");
    currentNoInfo = {
      no: kj[8].slice(-3),
      year: kj[8].slice(0, 4)
    }
  },
  picData: async function () {
    let url = "";
    if (pageLoadContent == "home") {
      await this.mAjax(
        "https://336640.tpxiaoshimei.com/imgs.php",
        this.homeData,
        this.render
      );
    }
    if (pageLoadContent == "picList") {
      await this.mAjax(
        "https://336640.tpxiaoshimei.com/imgs.php",
        this.homeData,
        this.picListRender
      );
    }

    if (pageLoadContent == "pic") {
      let id = new URLSearchParams(window.location.search).get("id");
      await this.mAjax(
        `https://336640.tpxiaoshimei.com/imgs.php?act=detail&amp;id=${id}`,
        this.picDetail,
        this.swiperPic
      );
    }
  },
  homeData: function (data, fnCallback) {
    data = data ? JSON.parse(data) : myData;
    myData = data.data;
    page = 1;
    fnCallback();
    if (pageLoadContent == "home") {
      document.addEventListener("scroll", (event) =&gt; {
        let picWrap = document.querySelector(".pic-wrap");
        if (window.scrollY &gt; picWrap.offsetHeight - 900) {
          page++;
          fnCallback();
        }
      });
    }
  },
  picList: function (data, picListRender) {
    data = data ? JSON.parse(data) : myData;
    myData = data.data;
    picListRender();
  },
  render: function () {
    imgLoad = localStorage.getItem("imgLoad") || "col";

    if (myData[imgLoad]) {
      const limit = 18;
      let data = [];
      let d = myData[imgLoad];
      let picWrap = document.querySelector(".pic-wrap .wrap");
      if (searchContent &amp;&amp; searchContent != "") {
        d = d.filter((item) =&gt; item.name.includes(searchContent));
      }
      const totalPage = Math.ceil(d.length / limit);
      if (page &gt; totalPage) return;
      data = pageData(d, limit, this.page);
      if (data.length &gt; 0) {
        data.map((item) =&gt; {
          let box = document.createElement("div");
          box.classList.add("box");
          let html = `&lt;a class="info" item="${item.id}" href="pic.html?id=${item.id}"&gt;
                            &lt;img src="${hostImg}/thumb/${imgLoad}/${item.imgAlias}?v=${ver}" alt="${item.name}"&gt;
                            &lt;span&gt;${item.name}[${item.no}æœŸ]&lt;/span&gt;
                        &lt;/a&gt;`;
          box.innerHTML = html;
          if (picWrap) {
            picWrap.appendChild(box);
          }
        });
      }
      //   let picInfo = document.querySelectorAll(".pic-wrap .wrap .info");
      //   if (picInfo.length &gt; 0) {
      //     picInfo.forEach((ele) =&gt; {
      //       ele.addEventListener("click", (e) =&gt; {
      //         let id = ele.getAttribute("item");
      //         window.location.href = `pic.html?id=${id}`;
      //       });
      //     });
      //   }
    }
  },
  picListRender: function (imgType = null) {
    imgLoad = imgType ?? (localStorage.getItem("imgLoad") || "col");
    if (myData[imgLoad]) {
      let d = myData[imgLoad];
      if (searchContent &amp;&amp; searchContent != "") {
        d = d.filter((item) =&gt; item.name.includes(searchContent));
      }
      let ul = document.querySelector("ul.indexed-list");

      if (d.length &gt; 0) {
        let html = d
          .map((item) =&gt; {
            return `&lt;li class="pic-item" item="${item.id}"&gt;
                    &lt;img src="${hostImg}/thumb/${imgLoad}/${item.imgAlias}?v=${ver}" loading="lazy" alt="${item.name}"&gt;
                    &lt;a&gt;&lt;label&gt;${item.name}&lt;span&gt;${item.no}&lt;/span&gt;&lt;/label&gt;&lt;/a&gt;
                &lt;/li&gt;`;
          })
          .join("");
        if (ul) {
          ul.innerHTML = html;
        }
        let itemLi = document.querySelectorAll("ul.indexed-list li");
        if (itemLi.length &gt; 0) {
          itemLi.forEach((ele) =&gt; {
            ele.addEventListener("click", () =&gt; {
              let id = ele.getAttribute("item");
              window.location.href = `pic.html?id=${id}`;
            });
          });
        }
      } else {
        ul.innerHTML = `&lt;li style="text-align:center;font-size:20px"&gt;æœªæ‰¾åˆ°æ•°æ®&lt;/li&gt;`;
      }
    }
  },
  methods: function () {
    var self = this;
    /*let nav = document.getElementById("nav");
    if (nav) {
      let html = `&lt;ul&gt;`;
      html += navi
        .map((item) =&gt; {
          return `&lt;li class="nav-item"&gt;&lt;a href="${item.url}" tar="${item.alias}"&gt;&lt;img src="${item.icon}" alt="${item.title}"&gt;${item.title}&lt;/a&gt;&lt;/li&gt;`;
        })
        .join("");
      html += `&lt;/ul&gt;`;
      nav.innerHTML = html;
      document.querySelectorAll(".nav-item a").forEach((ele) =&gt; {
        ele.addEventListener("click", (e) =&gt; {
          e.preventDefault();
          if (["col", "black"].includes(ele.getAttribute("tar"))) {
            imgLoad = ele.getAttribute("tar");
            localStorage.setItem("imgLoad", imgLoad);
            window.location.href = ele.getAttribute("href");
          } else {
            window.open(ele.getAttribute("href"), "_blank");
          }
        });
      });
    }*/

    let search = document.querySelector("form.search");
    let picWrap = document.querySelector(".pic-wrap .wrap");
    if (search) {
      search.querySelector("input").addEventListener("focus", (e) =&gt; {
        search.classList.add("isFocus");
      });
      search.querySelector("input").addEventListener("blur", (e) =&gt; {
        if (e.target.value == "") {
          search.classList.remove("isFocus");
          if (iSearch) {
            searchContent = null;
            picWrap.innerHTML = "";
            page = 1;
            iSearch = false;
            self.render();
            document.querySelector("header .search .x-icon").style.display =
              "none";
          }
          return;
        }
      });

      search.addEventListener("submit", (e) =&gt; {
        e.preventDefault();
        let txtEle = search.querySelector("input#search");
        iSearch = true;
        picWrap.innerHTML = "";
        page = 1;
        searchContent = txtEle.value;
        self.render();
        document.querySelector("header .search .x-icon").style.display =
          "unset";
      });
      let clearSearch = document.querySelector("header .search .x-icon");
      if (clearSearch) {
        clearSearch.addEventListener("click", (e) =&gt; {
          e.preventDefault();
          picWrap.innerHTML = "";
          page = 1;
          clearSearch.style.display = "none";
          searchContent = null;
          document.querySelector("form.search input").value = null;
          iSearch = false;
          self.render();
        });
      }
    }

    let panels = document.querySelectorAll("[caitu]");
    if (panels.length &gt; 0) {
      panels.forEach((ele) =&gt; {
        ele.addEventListener("click", (e) =&gt; {
          panels.forEach((el) =&gt; el.classList.remove("active"));
          ele.classList.add("active");
          imgLoad = ele.getAttribute("caitu");
          localStorage.setItem("imgLoad", imgLoad);
          picWrap.innerHTML = "";
          page = 1;
          self.render();
        });
      });
      imgLoad = localStorage.getItem("imgLoad") || imgLoad;
      if (imgLoad) {
        panels.forEach((el) =&gt; el.classList.remove("active"));
        panels.forEach((ele) =&gt; {
          if (ele.getAttribute("caitu") == imgLoad) {
            ele.classList.add("active");
          }
        });
      }
    }

    let selectType = document.querySelector("#searchForm select#type");
    if (selectType) {
      let inpEle = document.getElementById("keyword");
      selectType.addEventListener("change", (e) =&gt; {
        imgLoad = e.target.value;
        let keyword = inpEle.value;
        searchContent = keyword ?? null;
        document.querySelector("header .tit").innerHTML =
          imgLoad == "col" ? "å½©è‰²å½©ç¥¨" : "é»‘ç™½å½©ç¥¨";
        self.picListRender(imgLoad);
      });
      inpEle.addEventListener("keyup", (e) =&gt; {
        searchContent = e.target.value;
        imgLoad = selectType.value;
        self.picListRender(imgLoad);
      });
      imgLoad = localStorage.getItem("imgLoad") || "col";
      selectType.value = imgLoad;
      document.querySelector("header .tit").innerHTML =
        imgLoad == "col" ? "å½©è‰²å½©ç¥¨" : "é»‘ç™½å½©ç¥¨";
    }
    let homeIcon = document.getElementById("go-home");
    if (homeIcon) {
      homeIcon.addEventListener("click", () =&gt; {
        window.location.href = "index.html";
      });
    }
    let backIcon = document.getElementById("go-back");
    if (backIcon) {
      backIcon.addEventListener("click", () =&gt; {
        window.location.href = './'
      });
    }
  },
  picDetail: function (data, swiperPic) {
    data = data ? JSON.parse(data) : { data: null };
    obj = data.data;
    if (obj) {
      document.querySelector("header .tit").innerHTML = obj.name;
      let picArr = obj.url.replace("https://352611.com/", "").split("/");
      let slideItem = "";
      let img =
        hostImg +
        "/images/hk/"+currentNoInfo.year+"/" +
        picArr[0] +
        "/" +
        obj.no +
        "/" +
        picArr[2];
      let noTxt = "";
      for (let no = parseInt(obj.no); no &gt; 0; no--) {
        picArr[1] = no;
        let imgUrl = hostImg + "/images/hk/"+currentNoInfo.year+"/" + picArr.join("/");
        // imgUrl = obj.url.replace("[no]", no);
        if (no &gt; parseInt(obj.no) - 3) {
          slideItem += `&lt;div class="swiper-slide"&gt;&lt;img data-src="${imgUrl}" src="${imgUrl}" alt="${obj.name}"/&gt;&lt;/div&gt;`;
        } else {
          slideItem += `&lt;div class="swiper-slide"&gt;&lt;img data-src="${imgUrl}" alt="${obj.name}"/&gt;&lt;/div&gt;`;
        }
        noTxt += `&lt;li class="item-no ${no == obj.no ? "active" : ""
          }"&gt;${no}æœŸ&lt;/li&gt;`;
      }

      let swiperEle = document.querySelector(".p-swiper .swiper-wrapper");
      if (swiperEle) {
        swiperEle.innerHTML = slideItem;
      }
      let peroid = document.querySelector(".period ul");
      if (peroid) {
        peroid.innerHTML = noTxt;
      }
      let qishurUl = document.querySelector(".qishur-box ul");
      if (qishurUl) {
        qishurUl.innerHTML = noTxt;
      }
      swiperPic();
      getMeta(img, (err, img) =&gt; {
        let switem = document.querySelectorAll(".p-swiper .swiper-slide");
        if (switem.length &gt; 0) {
          let offsetHeight = switem[0].offsetHeight;
          switem.forEach((item) =&gt; {
            item.style.minHeight = `${offsetHeight}px`;
            item.style.backgroundColor = "#f3f3f3";
          });
        }
      });
      let quishuEle = document.querySelector(".qishur-down");
      if (quishuEle) {
        let qishurBox = document.querySelector(".qishur-box");
        quishuEle.addEventListener("click", () =&gt; {
          if (qishurBox) {
            if (qishurBox.classList.contains("hide")) {
              qishurBox.classList.remove("hide");
            } else {
              qishurBox.classList.add("hide");
            }
          }
        });
      }
    }
  },
  swiperPic: function () {
    let period = document.querySelectorAll(".period li");
    let qishur = document.querySelectorAll(".qishur-box li");
    let swiperImg = document.querySelectorAll(".p-swiper img");
    let swiper_setting = {
      spaceBetween: 5,
      dynamicHeight: true,
    };
    let swiper = new Swiper(".p-swiper", swiper_setting);
    swiper.on("slideChange", function () {
      if (period.length &gt; 0) {
        period.forEach((item) =&gt; {
          item.classList.remove("active");
        });
        period[swiper.activeIndex].classList.add("active");
        period[swiper.activeIndex].scrollIntoView({
          behavior: "smooth",
          block: "center",
          inline: "center",
        });
        index = swiper.activeIndex;
        let imgSrc = swiperImg[index].getAttribute("data-src");
        swiperImg[index].setAttribute("src", imgSrc);
        if (index + 2 &lt; swiperImg.length) {
          let imgSrc_2 = swiperImg[index + 2].getAttribute("data-src");
          swiperImg[index + 2].setAttribute("src", imgSrc_2);
        }
        if (index + 3 &lt; swiperImg.length) {
          let imgSrc_3 = swiperImg[index + 3].getAttribute("data-src");
          swiperImg[index + 3].setAttribute("src", imgSrc_3);
        }
      }
      if (qishur.length &gt; 0) {
        qishur.forEach((item) =&gt; {
          item.classList.remove("active");
        });
        qishur[swiper.activeIndex].classList.add("active");
      }
    });
    if (period.length &gt; 0) {
      period.forEach((ele, index) =&gt; {
        ele.addEventListener("click", (e) =&gt; {
          swiper.slideTo(index);
          ele.classList.remove("active");
          period[index].classList.add("active");
        });
      });
    }
    if (qishur.length &gt; 0) {
      let qishurBox = document.querySelector(".qishur-box");
      qishur.forEach((ele, index) =&gt; {
        ele.addEventListener("click", (e) =&gt; {
          swiper.slideTo(index);
          ele.classList.remove("active");
          qishur[index].classList.add("active");
          if (qishurBox) {
            qishurBox.classList.add("hide");
          }
        });
      });
    }
  },
};
document.addEventListener("DOMContentLoaded", function () {
  document.querySelectorAll(".nav-item a").forEach((ele) =&gt; {
    ele.addEventListener("click", (e) =&gt; {
      e.preventDefault();
      if (["col", "black"].includes(ele.getAttribute("tar"))) {
        imgLoad = ele.getAttribute("tar");
        localStorage.setItem("imgLoad", imgLoad);
        window.location.href = ele.getAttribute("href");
      } else {
        window.open(ele.getAttribute("href"), "_blank");
      }
    });
  });
});

const initLinks = [
  {
    name: "åŸŸåâ‘&nbsp; 475044.com",
    url: "https://336640n125.76mt8qonxb.icu/",
    color: "#FF00FF",
  },
  {
    name: "åŸŸåâ‘¡ 476044.com",
    url: "https://336640n125.76mt8qonxb.icu/",
    color: "#FF00FF",
  },
  {
    name: "çœ‹æœ€å¿«å¼€å¥–ç»“æžœ",
    url: "https://336640n125.bsl3i4fcjq.icu/#891344",
    color: "#FF00FF",
  },
  {
    name: "å¹³ç‰¹ä¸‰è¿žè‚–",
    url: "https://336640n125.p3iihj3p05.icu/#891344",
    color: "#FF00FF",
  },
  {
    name: "å¹³ç&nbsp;ä¸‰ä¸­ä¸‰",
    url: "https://336640n125.21ywn79ct7.icu/#891344",
    color: "#FF0000",
  },
  {
    name: "çŽ„æœºè§£â‘&nbsp;ç&nbsp;",
    url: "https://336640n125.sk25a533x5.icu/#891344",
    color: "#0000FF",
  },
  {
    name: "é‡ç‚¹ä¹°ï¼•ç&nbsp;",
    url: "https://336640n125.ujmizb3vud.icu/#891344",
    color: "#FF0000",
  },
  {
    name: "ä¸€å¥çˆ†ç‰¹ç&nbsp;",
    url: "https://336640n125.uiuwnkvt03.icu/#891344",
    color: "#0000FF",
  },
  {
    name: "ä¸€å¥è§£ç‰¹è‚–",
    url: "https://336640n125.6a3lkj64id.icu/#891344",
    color: "#FF00FF",
  },
  {
    name: "600å›¾åº“",
    url: "https://tkdh365.dbrpgfiu7.cc",
    color: "#FF00FF",
    maxWidthShow: 544
  },
]

const screenWidth = window.innerWidth
const linksElm = document.getElementById("link-ads");
const linksHtml = initLinks.map(item =&gt; {
  return `&lt;a href="${item.url}" style="color:${item.color};display:${(screenWidth || 0) &gt; item.maxWidthShow ? "none" : "flex"}"  target="_blank"&gt;${item.name}&lt;/a&gt;`
}).join("");
if(linksElm) linksElm.innerHTML = linksHtml;</pre></body></html>