@@ -1251,6 +1262,12 @@ public static class HtmlRenderer
const host = url.hostname.toLowerCase();
const path = url.pathname.replace(/^\/+|\/+$/g, '');
+ 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;
+ window.location.href = '/hitomi/' + id + '/';
+ return;
+ }
if (host.includes('aurahentai.com')) {
const segs = path.split('/');
const id = segs.length >= 2 ? segs[1] : segs[0];
@@ -1280,15 +1297,18 @@ public static class HtmlRenderer
return;
}
- // スラッシュが含まれる場合 (例: momonga/mo3469109 や aurahentai/013597 や gallery/013597)
+ // スラッシュが含まれる場合 (例: hitomi/4159707 や momonga/mo3469109 や aurahentai/013597)
if (input.includes('/')) {
window.location.href = '/' + input.replace(/^\/+|\/+$/g, '') + '/';
return;
}
// 自動判定
- if (/^\d+$/.test(input)) {
- // 数字のみ -> aurahentai
+ if (/^\d{7,}$/.test(input)) {
+ // 7桁以上の数字 -> hitomi
+ window.location.href = '/hitomi/' + input + '/';
+ } else if (/^\d+$/.test(input)) {
+ // 6桁以下の数字 -> aurahentai
window.location.href = '/aurahentai/' + input + '/';
} else if (input.startsWith('mo') || input.startsWith('MO')) {
// moで始まる -> momonga
@@ -1301,6 +1321,7 @@ public static class HtmlRenderer