ComicRead

Add enhanced features to the comic site for optimized experience, including dual-page reading and translation. E-Hentai (Associate nhentai, Quick favorite, Colorize tags, Floating tag list, etc.) | nhentai (Totally block comics, Auto page turning) | hitomi | Anchira | kemono | nekohouse | welovemanga.

< Feedback on ComicRead

Review: OK - script works, but has bugs

§
Posted: 2024-05-03

問題回報,
在 dm5.com 那邊,每個漫畫的第一頁都不顯示,最後一頁則是重複兩次

§
Posted: 2024-05-04
//參考用$.ajax()改寫成window.fetch(),並行請求一次全部獲取並且按圖片順序返回。
const DM5_getImgs = () => {
    const {
        DM5_IMAGE_COUNT,
        DM5_CURL,
        DM5_CID,
        DM5_MID,
        DM5_VIEWSIGN_DT,
        DM5_VIEWSIGN
    } = window;
    const keyE = document.querySelector("#dm5_key");
    const key = keyE.value;
    const resArr = [];
    for (let i = 1; i <= DM5_IMAGE_COUNT; i++) {
        const searchParams = new URLSearchParams({
            cid: DM5_CID,
            page: i,
            key: key,
            language: 1,
            gtk: 6,
            _cid: DM5_CID,
            _mid: DM5_MID,
            _dt: DM5_VIEWSIGN_DT,
            _sign: DM5_VIEWSIGN
        });
        const api = `${DM5_CURL}chapterfun.ashx?${searchParams}`;
        const res = window.fetch(api).then(res => res.text()).then(code => eval(code)[0]);
        resArr.push(res);
    }
    return Promise.all(resArr).then(scrs => {
        console.log(scrs);
        return scrs;
    });
};
DM5_getImgs();
hymbzAuthor
§
Posted: 2024-05-09

已更新修复

Post reply

Sign in to post a reply.