@@ -1262,6 +1273,18 @@ public static class HtmlRenderer
const host = url.hostname.toLowerCase();
const path = url.pathname.replace(/^\/+|\/+$/g, '');
+ if (host.includes('e-hentai.org') || host.includes('exhentai.org')) {
+ const gm = path.match(/g\/(\d+)\/([a-z0-9]+)/i);
+ if (gm) {
+ window.location.href = '/ehentai/' + gm[1] + '/' + gm[2] + '/';
+ return;
+ }
+ const sm = path.match(/s\/([a-z0-9]+)\/(\d+)-/i);
+ if (sm) {
+ window.location.href = '/view?url=' + encodeURIComponent(input);
+ return;
+ }
+ }
if (host.includes('hitomi.la')) {
const m = path.match(/(?:-|\/)(\d{5,8})(?:\.html)?$/) || path.match(/\d{5,8}/);
const id = m ? m[1] || m[0] : path;
@@ -1297,7 +1320,14 @@ public static class HtmlRenderer
return;
}
- // スラッシュが含まれる場合 (例: hitomi/4159707 や momonga/mo3469109 や aurahentai/013597)
+ // E-Hentai の gid/token 形式 (例: 4159771/95d2fa13bd または 4159771_95d2fa13bd)
+ const ehPair = input.match(/^(\d+)[/_ -]([a-z0-9]{10})$/i);
+ if (ehPair) {
+ window.location.href = '/ehentai/' + ehPair[1] + '/' + ehPair[2] + '/';
+ return;
+ }
+
+ // スラッシュが含まれる場合 (例: ehentai/4159771/95d2fa13bd や hitomi/4159707 や momonga/mo3469109)
if (input.includes('/')) {
window.location.href = '/' + input.replace(/^\/+|\/+$/g, '') + '/';
return;
@@ -1322,6 +1352,7 @@ public static class HtmlRenderer