This commit is contained in:
edidealt 2026-03-02 21:14:14 +00:00
parent 3de1221c20
commit 69652ba085

View file

@ -2300,7 +2300,14 @@ document.addEventListener('DOMContentLoaded', async () => {
const url = query.startsWith('http') ? query : 'https://' + query;
try {
const urlObj = new URL(url);
const path = urlObj.pathname;
let path = urlObj.pathname;
// Remove trailing slashes and get just endpoint/id
path = path.replace(/\/+$/, '');
// Get just the first two segments (e.g., /album/382839956)
const segments = path.split('/').filter((s) => s);
if (segments.length >= 2) {
path = '/' + segments[0] + '/' + segments[1];
}
navigate(path);
return true;
} catch {