From ea042b848a913ca86a7999d0a62c8b2a7c3f272b Mon Sep 17 00:00:00 2001 From: nyne Date: Sat, 16 Nov 2024 22:17:01 +0800 Subject: [PATCH] replace e-hentai to exhentai if domain is set to exhentai.org --- ehentai.js | 10 ++++++++-- index.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ehentai.js b/ehentai.js index 0d109f9..2cf47b4 100644 --- a/ehentai.js +++ b/ehentai.js @@ -7,7 +7,7 @@ class Ehentai extends ComicSource { // unique id of the source key = "ehentai" - version = "1.0.6" + version = "1.0.7" minAppVersion = "1.0.0" @@ -392,8 +392,14 @@ class Ehentai extends ComicSource { */ load: async (option, page) => { let res = await this.getGalleries(`https://e-hentai.org/toplist.php?tl=${option}&=${page}`, true); + let comics = res.comics + if(this.loadSetting('domain') === 'exhentai.org') { + comics.forEach((e) => { + e.id = e.id.replace('e-hentai', 'exhentai') + }) + } return { - comics: res.comics, + comics: comics, maxPage: 200, } } diff --git a/index.json b/index.json index 6832320..7badb99 100644 --- a/index.json +++ b/index.json @@ -45,7 +45,7 @@ "name": "ehentai", "fileName": "ehentai.js", "key": "ehentai", - "version": "1.0.6" + "version": "1.0.7" }, { "name": "禁漫天堂",