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

@ -1,3 +1,3 @@
<!-- OAuth Comment System - Load globally for session management -->
<script type="module" crossorigin src="/assets/comment-atproto-Do1JWJCw.js"></script>
<script type="module" crossorigin src="/assets/comment-atproto-BuIwSgQs.js"></script>
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-CPKYAM8U.css">

View File

@ -1,3 +1,3 @@
<!-- OAuth Comment System - Load globally for session management -->
<script type="module" crossorigin src="/assets/comment-atproto-Do1JWJCw.js"></script>
<script type="module" crossorigin src="/assets/comment-atproto-BuIwSgQs.js"></script>
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-CPKYAM8U.css">

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;
}