From a10935f00e852b87eb06f8edebd1b5e51afc8495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=AA=E5=AD=90?= Date: Tue, 29 Oct 2024 11:44:38 +0800 Subject: [PATCH] Update Artalk.astro --- src/components/Artalk.astro | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/components/Artalk.astro b/src/components/Artalk.astro index 5bdb5b6..8e8f703 100644 --- a/src/components/Artalk.astro +++ b/src/components/Artalk.astro @@ -42,18 +42,4 @@ const { site, server } = Astro.props; console.log('Custom swap implementation'); // 这里可以添加你自己的逻辑,例如更新评论 } - - // 使用 MutationObserver(可选) - const observer = new MutationObserver(() => { - initializeArtalk(document); - }); - - // 开始观察 - const commentsDiv = document.getElementById('Comments'); - if (commentsDiv) { - observer.observe(commentsDiv, { - childList: true, - subtree: true - }); - } \ No newline at end of file