Skip to content

Commit

Permalink
Update Artalk.astro
Browse files Browse the repository at this point in the history
  • Loading branch information
jkjoy committed Oct 29, 2024
1 parent 4f1e099 commit a10935f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/components/Artalk.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
}
</script>

0 comments on commit a10935f

Please sign in to comment.