magzine - 移动端菜单OpenWrite限制

This commit is contained in:
tangly1024.com
2024-09-18 09:45:49 +08:00
parent 7476b6db3e
commit ea4dacad18
3 changed files with 12 additions and 11 deletions

View File

@@ -79,13 +79,14 @@ const OpenWrite = () => {
return
}
if (isBrowser && blogId) {
toggleTocItems(true) // 禁止目录项的点击
// Check if the element with id 'read-more-wrap' already exists
const readMoreWrap = document.getElementById('read-more-wrap')
// Only load the script if the element doesn't exist
if (!readMoreWrap) {
loadOpenWrite()
toggleTocItems(true) // 禁止目录项的点击
}
}
})