From ca2f62648308cc2cad5bb8521f981bd39be964d3 Mon Sep 17 00:00:00 2001 From: Pacalini <141402887+Pacalini@users.noreply.github.com> Date: Sun, 24 Aug 2025 18:09:05 +0800 Subject: [PATCH] eh&nh: fix url open (#142) --- ehentai.js | 4 ++-- index.json | 4 ++-- nhentai.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ehentai.js b/ehentai.js index ee5f32d..f7c80ff 100644 --- a/ehentai.js +++ b/ehentai.js @@ -7,7 +7,7 @@ class Ehentai extends ComicSource { // unique id of the source key = "ehentai" - version = "1.1.3" + version = "1.1.4" minAppVersion = "1.0.0" @@ -1182,7 +1182,7 @@ class Ehentai extends ComicSource { if(url.includes('?')) { url = url.split('?')[0] } - let reg = RegExp("https?://(e-|ex)hentai.org/g/(\\d+)/(\\w+)/") + let reg = RegExp("https?://(e-|ex)hentai.org/g/(\\d+)/(\\w+)/?$") let match = reg.exec(url) if(match) { return `${this.baseUrl}/g/${match[2]}/${match[3]}/` diff --git a/index.json b/index.json index eef5ebe..c4bed89 100644 --- a/index.json +++ b/index.json @@ -27,7 +27,7 @@ "name": "nhentai", "fileName": "nhentai.js", "key": "nhentai", - "version": "1.0.5" + "version": "1.0.6" }, { "name": "紳士漫畫", @@ -40,7 +40,7 @@ "name": "ehentai", "fileName": "ehentai.js", "key": "ehentai", - "version": "1.1.3" + "version": "1.1.4" }, { "name": "禁漫天堂", diff --git a/nhentai.js b/nhentai.js index f029b24..7d480bf 100644 --- a/nhentai.js +++ b/nhentai.js @@ -7,7 +7,7 @@ class Nhentai extends ComicSource { // unique id of the source key = "nhentai" - version = "1.0.5" + version = "1.0.6" minAppVersion = "1.0.0" @@ -523,7 +523,7 @@ class Nhentai extends ComicSource { 'nhentai.net', ], linkToId: (url) => { - let regex = /\/g\/(\d+)\//g + let regex = /\/g\/(\d+)\/?$/g let match = regex.exec(url) if(match) { return match[1]