ComicRead

Add enhanced features to the comic site for optimized experience, including dual-page reading and translation.

< Feedback on ComicRead

Question/comment

§
Posted: 2021-04-30

动漫之家的被封漫画解禁功能失效了(例如这个漫画),希望能尽快修复。据测试,v3api 貌似获取不到章节列表了,而从 tachiyomi 的代码看来,https://api.dmzj.com/dynamic/comicinfo/${comic_id}.json 尚可使用,但返回的 JSON 结构不一定相同。

顺便问一下,我看到代码里有给页面新增 #ScriptMenu,应该是可以调整一些设置吧?但是我在动漫之家的漫画页下找不到设置在哪,望指教(我对 JavaScript 一窍不通,有理解错误的地方请指出)。

§
Posted: 2021-05-17

算了,自己动手丰衣足食,不完善但是对一般的漫画够用了。修改的这部分大概在 900 多行的地方

        // 判断当前页是漫画页
        if (typeof g_comic_name !== 'undefined') {
          // 判断漫画被禁
          if (ScriptMenu.UserSetting['体验优化']['阅读被封漫画'] && document.querySelector('.cartoon_online_border>img')) {
            [...document.querySelectorAll('.odd_anim_title ~ div')].forEach(e => e.parentNode.removeChild(e));

            GM_xmlhttpRequest({
              method: 'GET',
              url: `https://api.dmzj.com/dynamic/comicinfo/${g_comic_id}.json`,
              onload: (xhr) => {
                if (xhr.status === 200) {
                  let temp = '';
                  const Info = JSON.parse(xhr.responseText).data;
                  const last_updatetime = Info.info.last_updatetime;
                  //for (let i = 0; i < chapters.length; i++) {
                    temp = `${temp}<div class="photo_part"><div class="h2_title2"><span class="h2_icon h2_icon22"></span><h2>${Info.info.title}</h2></div></div><div class="cartoon_online_border" style="border-top: 1px dashed #0187c5;"><ul>`;
                    const chaptersList = Info.list;
                    {
                      let i = chaptersList.length;
                      while (i--)
                        temp = `${temp}<li><a target="_blank" title="${chaptersList[i].chapter_name}" href="https://manhua.dmzj.com/${g_comic_url}${chaptersList[i].id}.shtml" ${chaptersList[i].updatetime === last_updatetime ? 'class="color_red"' : ''}>${chaptersList[i].chapter_name}</a></li>`;
                    }
                    temp = `${temp}</ul><div class="clearfix"></div></div>`;
                  //}
                  appendDom(document.getElementsByClassName('middleright_mr')[0], temp);
                }
              },
            });
          } else if (ScriptMenu.UserSetting['体验优化']['在新页面中打开链接'])
            [...document.querySelectorAll('a:not([href^="javascript:"])')].forEach(e => e.setAttribute('target', '_blank'));
        }
      } else {
§
Posted: 2021-05-18

经测试,上面那段代码虽然能在漫画详情页显示出章节页的链接,但是有些章节点进去后还是会显示“漫画不存在”,原因不明。

hymbzAuthor
§
Posted: 2021-05-18

非常抱歉因为一直在忙所以暂时没时间搞脚本这边的事(;´Д`),之后会更新的。 ScriptMenu是点击地址栏右边扩展栏里的Tampermonkey扩展按钮后弹出的菜单里的「漫画阅读脚本设置」,因为不常用所以就没加到网页里。

§
Posted: 2021-05-20

非常抱歉因为一直在忙所以暂时没时间搞脚本这边的事(;´Д`),之后会更新的。
ScriptMenu是点击地址栏右边扩展栏里的Tampermonkey扩展按钮后弹出的菜单里的「漫画阅读脚本设置」,因为不常用所以就没加到网页里。

找到设置了,感谢!期待今后的更新

Post reply

Sign in to post a reply.