diff --git a/js/card.js b/js/card.js index 585081a..95a7a4a 100644 --- a/js/card.js +++ b/js/card.js @@ -208,5 +208,5 @@ export const card = (() => { renderInnerContent, renderContent: (comment) => renderContent(comment, true), convertMarkdownToHTML - } + }; })(); \ No newline at end of file diff --git a/js/comment.js b/js/comment.js index 794700c..ba2ac55 100644 --- a/js/comment.js +++ b/js/comment.js @@ -14,6 +14,17 @@ export const comment = (() => { const tracker = storage('tracker'); const showHide = storage('comment'); + const changeButton = (id, disabled) => { + const buttonMethod = ['reply', 'edit', 'remove']; + + buttonMethod.forEach((v) => { + const status = document.querySelector(`[onclick="comment.${v}(this)"][data-uuid="${id}"]`); + if (status) { + status.disabled = disabled; + } + }); + }; + const remove = async (button) => { if (!confirm('Are you sure?')) { return; @@ -59,17 +70,6 @@ export const comment = (() => { document.getElementById(id).remove(); }; - const changeButton = (id, disabled) => { - const buttonMethod = ['reply', 'edit', 'remove']; - - buttonMethod.forEach((v) => { - const status = document.querySelector(`[onclick="comment.${v}(this)"][data-uuid="${id}"]`); - if (status) { - status.disabled = disabled; - } - }); - }; - const update = async (button) => { const id = button.getAttribute('data-uuid'); @@ -461,5 +461,5 @@ export const comment = (() => { update, comment, showOrHide, - } + }; })(); \ No newline at end of file diff --git a/js/util.js b/js/util.js index 42a1918..05e012c 100644 --- a/js/util.js +++ b/js/util.js @@ -115,5 +115,5 @@ export const util = (() => { escapeHtml, disableButton, addLoadingCheckbox, - } + }; })(); \ No newline at end of file