fix: correct typo in progress tracking variable name from Progss to Progress

This commit is contained in:
2026-05-11 05:02:06 +00:00
parent 140cceff64
commit 502f77f718
40 changed files with 1554 additions and 49 deletions
+28
View File
@@ -11,6 +11,7 @@ class Application {
this.initFormDisable();
this.initContentRenderer();
this.initCommentReply();
this.initEmojiPickers();
}
@@ -195,6 +196,33 @@ class Application {
contentRenderer.highlightAll();
}
initCommentReply() {
document.querySelectorAll(".comment-action-btn").forEach((btn) => {
if (btn.textContent.trim() !== "Reply") return;
btn.addEventListener("click", (e) => {
e.preventDefault();
const comment = btn.closest(".comment");
const commentForm = document.querySelector(".comment-form");
if (!comment || !commentForm) return;
const textarea = commentForm.querySelector("textarea");
if (!textarea) return;
let parentInput = commentForm.querySelector('input[name="parent_uid"]');
if (!parentInput) {
parentInput = document.createElement("input");
parentInput.type = "hidden";
parentInput.name = "parent_uid";
commentForm.appendChild(parentInput);
}
const commentBody = comment.querySelector(".comment-body");
if (commentBody && commentBody.dataset.commentUid) {
parentInput.value = commentBody.dataset.commentUid;
}
textarea.focus();
textarea.scrollIntoView({ behavior: "smooth" });
});
});
}
initEmojiPickers() {
document.querySelectorAll(".comment-form textarea, .emoji-picker-target").forEach((textarea) => {
if (textarea.dataset.emojiInitialized) return;