improvement: 主頁分頁會定位到文章區域 close #519

fix: 修復設置highlight_height_limit後,highlight_shrink點擊無效的bug close #520
This commit is contained in:
Jerry
2021-03-17 17:27:35 +08:00
parent ae09fb89b5
commit 1952046a8a
3 changed files with 10 additions and 8 deletions

View File

@@ -146,7 +146,7 @@ document.addEventListener('DOMContentLoaded', function () {
const highlightShrinkFn = (ele) => {
const $nextEle = [...ele.parentNode.children].slice(1)
ele.firstChild.classList.toggle('closed')
if (btf.isHidden($nextEle[0])) {
if (btf.isHidden($nextEle[$nextEle.length - 1])) {
$nextEle.forEach(e => { e.style.display = 'block' })
} else {
$nextEle.forEach(e => { e.style.display = 'none' })