This commit is contained in:
2026-08-09 04:18:57 +02:00
parent 06dd14712d
commit 66386213a1

View File

@@ -1140,6 +1140,7 @@ class CommentSystem {
} }
quoteComment(id, openerEl, body) { quoteComment(id, openerEl, body) {
if (!window.f0ckSession || !window.f0ckSession.logged_in) return;
// If no reply input open anywhere, open the local one // If no reply input open anywhere, open the local one
let textarea = document.querySelector('.comment-input.reply-input textarea'); let textarea = document.querySelector('.comment-input.reply-input textarea');
let isNew = false; let isNew = false;
@@ -3212,6 +3213,9 @@ class CommentSystem {
if (target.classList.contains('comment-permalink') || target.closest('.comment-time')) { if (target.classList.contains('comment-permalink') || target.closest('.comment-time')) {
const el = target.closest('.comment-permalink, .comment-time'); const el = target.closest('.comment-permalink, .comment-time');
if (el) { if (el) {
if (!window.f0ckSession || !window.f0ckSession.logged_in) {
return; // Let standard anchor link behavior scroll/jump to #c{id}
}
const id = el.dataset.id; const id = el.dataset.id;
const commentEl = el.closest('[id^="c"]'); const commentEl = el.closest('[id^="c"]');
const body = commentEl ? commentEl.querySelector('.comment-body') : null; const body = commentEl ? commentEl.querySelector('.comment-body') : null;