fix comment input

This commit is contained in:
2025-06-14 21:09:10 +09:00
parent b7f62e729a
commit 0e75d4c0e6
3 changed files with 4 additions and 4 deletions

View File

@ -53,10 +53,10 @@ function generateCollectionNames(host: string): { comment: string; user: string;
}
// Extract rkey from current URL
// /posts/xxx.html -> xxx
// /posts/xxx -> xxx
function extractRkeyFromUrl(): string | undefined {
const pathname = window.location.pathname;
const match = pathname.match(/\/posts\/([^/]+)\.html$/);
const match = pathname.match(/\/posts\/([^/]+)\/?$/);
return match ? match[1] : undefined;
}