OpenWrite解锁文章高度调整

This commit is contained in:
tangly1024.com
2024-09-06 15:07:47 +08:00
parent b0d6865ddf
commit 498e8d0526

View File

@@ -55,9 +55,12 @@ const OpenWrite = () => {
// btw初始化后开始监听read-more-wrap何时消失
const intervalId = setInterval(() => {
const readMoreWrapElement = document.getElementById('read-more-wrap')
const articleWrapElement = document.getElementById('article-wrapper')
if (!readMoreWrapElement) {
if (!readMoreWrapElement && articleWrapElement) {
toggleTocItems(false) // 恢复目录项的点击
// 自动调整文章区域的高度
articleWrapElement.style.height = 'auto'
// 停止定时器
clearInterval(intervalId)
}