From b4f2dd8d11acaa4c61c762e60d02ce71aeea35b1 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Tue, 9 Jan 2024 01:07:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dartalk=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/comment/artalk.js | 11 +++++------ templates/post.html | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/templates/assets/js/comment/artalk.js b/templates/assets/js/comment/artalk.js index d9acb5c4..88f40c42 100644 --- a/templates/assets/js/comment/artalk.js +++ b/templates/assets/js/comment/artalk.js @@ -12,13 +12,12 @@ }, null)) if (GLOBAL_CONFIG.lightbox === 'null') return - Artalk.use(ctx => { - ctx.on('list-loaded', () => { - ctx.getCommentList().forEach(comment => { - const $content = comment.getRender().$content - btf.loadLightbox($content.querySelectorAll('img:not([atk-emoticon])')) - }) + window.artalkItem.on('list-loaded', () => { + window.artalkItem.ctx.get('list').getCommentNodes().forEach(comment => { + const $content = comment.getRender().$content + btf.loadLightbox($content.querySelectorAll('img:not([atk-emoticon])')) }) + }) } diff --git a/templates/post.html b/templates/post.html index a3c40ca5..6981d9c8 100644 --- a/templates/post.html +++ b/templates/post.html @@ -79,12 +79,12 @@ - + class="post-meta-wechat" th:title=" ${pluginFinder.available('plugin-platforms-sync') && (syncStatus == '同步更新文章成功' || syncStatus == '同步上传文章成功') ? '该文章已在公众号中更新' : '该文章在博客首发'}"> + 博客独享 - + 公众号同步