mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
theme-switch
This commit is contained in:
@@ -105,9 +105,8 @@ const initTheme = () => {
|
||||
if (elements?.length > 1) {
|
||||
elements[elements.length - 1].scrollIntoView()
|
||||
// 删除前面的元素,只保留最后一个元素
|
||||
elements[0].parentNode.removeChild(elements[0])
|
||||
if (Object.prototype.hasOwnProperty.call(elements, 'pop')) {
|
||||
elements.pop()
|
||||
for (let i = 0; i < elements.length - 1; i++) {
|
||||
elements[i].parentNode.removeChild(elements[i])
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
|
||||
Reference in New Issue
Block a user