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 | hdoujin | SchaleNetwork | nude-moon | HentaiZap | IMHentai | HentaiEra | HentaiEnvy | kemono | nekohouse | MangaDex | welovemanga
//參考用$.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();
已更新修复
問題回報,
在 dm5.com 那邊,每個漫畫的第一頁都不顯示,最後一頁則是重複兩次