Sleazy Fork is available in English.

ComicRead

为漫画站增加双页阅读、翻译等优化体验的增强功能。百合会——「记录阅读历史、自动签到等」、百合会新站、动漫之家——「解锁隐藏漫画」、E-Hentai——「匹配 nhentai 漫画」、nhentai——「彻底屏蔽漫画、自动翻页」、Yurifans——「自动签到」、拷贝漫画(copymanga)——「显示最后阅读记录」、PonpomuYuri、明日方舟泰拉记事社、禁漫天堂、漫画柜(manhuagui)、漫画DB(manhuadb)、动漫屋(dm5)、绅士漫画(wnacg)、mangabz、komiic、无限动漫、新新漫画、hitomi、Anchira、kemono、nekohouse、welovemanga

< Feedback on ComicRead

Review: Good - script works

§
Posted: 05 Mei 2024

拷贝漫画,『最後閱讀:獲取中』、『加载图片中』,讀取時間變得很長,約20秒,有重新安裝版本 8.10.0,但是還是沒改善,網站本身圖片加載很快,不知道是哪邊的問題?

§
Posted: 05 Mei 2024
Edited: 05 Mei 2024

我今天也遇到這問題,改寫了下代碼用window.fetch可以秒獲取。

  // 在目录页显示上次阅读记录
  if (window.location.href.includes('/comic/')) {
      const comicName = window.location.href.split('/comic/')[1];
      if (!comicName || !token) return;
      let a;
      const setStyle = main.createStyle();
      const updateLastChapter = async () => {
          // 因为拷贝漫画的目录是动态加载的,所以要等目录加载出来再往上添加
          if (document.cookie.includes("token")) {
              if (!!document.querySelector("#lastRead")) {
                  a = document.querySelector("#lastRead");
              } else {
                  a = document.createElement("a");
                  a.id = "lastRead";
                  a.target = "_blank";
                  const tableRight = await main.wait(() => main.querySelector(".table-default-right"));
                  tableRight.insertBefore(a, tableRight.firstElementChild);
                  const span = document.createElement("span");
                  span.innerText = "最後閱讀:";
                  tableRight.insertBefore(span, tableRight.firstElementChild);
              }
              a.innerText = "獲取中";
              a.removeAttribute("href");
              const [, , name] = window.location.pathname.split("/");
              const [, token] = /token=([^;]+)/.exec(document.cookie);
              const headers = new Headers({
                  Authorization: `Token ${token}`
              });
              window.fetch(`/api/v3/comic2/${name}/query?platform=3`, {
                  headers: headers
              }).then(res => res.json()).then(json => {
                  if (!!json.results?.browse) {
                      const lastChapterId = json.results.browse?.chapter_id;
                      if (!lastChapterId) {
                          a.innerText = '接口異常';
                          return;
                      }
                      a.href = window.location.pathname + "/chapter/" + lastChapterId;
                      a.innerText = json.results.browse.chapter_name;
                      setStyle(`ul a[href*="${lastChapterId}"] {
                          color: #fff !important;
                          background: #1790E6;
                      }`);
                  } else {
                      a.innerText = "無";
                  }
              }).catch(error => {
                  a.innerText = "接口異常";
                  console.error(error);
              });
          }
      };
      updateLastChapter();
      document.addEventListener('visibilitychange', updateLastChapter);
  }
§
Posted: 05 Mei 2024

我今天也遇到這問題,改寫了下代碼用window.fetch可以秒獲取。

『最後閱讀:獲取中』可以正常秒獲取了 十分感謝tony0809

§
Posted: 09 Mei 2024

感謝~我也正想問,好在有爬文
修改後閱讀紀錄很快出現

hymbzPembuat
§
Posted: 09 Mei 2024

已更新修复

§
Posted: 09 Mei 2024

辛苦了~^^

Post reply

Sign in to post a reply.