mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
Merge branch 'main' of https://github.com/tangly1024/NotionNext
This commit is contained in:
@@ -3,7 +3,7 @@ const idFlutteringRibbon = 'canvasFlutteringRibbon'
|
||||
|
||||
function destroyFlutteringRibbon() {
|
||||
const ribbon = document.getElementById(idFlutteringRibbon)
|
||||
if (ribbon && ribbon.parentNode) {
|
||||
if (ribbon && ribbon.parentNode && ribbon.parentNode.contains(ribbon)) {
|
||||
ribbon.parentNode.removeChild(ribbon)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ function createNest() {
|
||||
|
||||
function destroyNest() {
|
||||
const nest = document.getElementById(idNest)
|
||||
if(nest && nest.parentNode){
|
||||
if (nest && nest.parentNode && nest.parentNode.contains(nest)) {
|
||||
nest.parentNode.removeChild(nest)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ function createRibbon() {
|
||||
|
||||
function destroyRibbon() {
|
||||
const ribbon = document.getElementById(idRibbon)
|
||||
if (ribbon && ribbon.parentNode) {
|
||||
if (ribbon && ribbon.parentNode && ribbon.parentNode.contains(ribbon)) {
|
||||
ribbon.parentNode.removeChild(ribbon)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,9 +165,11 @@ function createSakura() {
|
||||
function stopp() {
|
||||
if (staticx) {
|
||||
var child = document.getElementById(id)
|
||||
child.parentNode.removeChild(child)
|
||||
window.cancelAnimationFrame(stop)
|
||||
staticx = false
|
||||
if (child && child.parentNode && child.parentNode.contains(child)) {
|
||||
child.parentNode.removeChild(child)
|
||||
window.cancelAnimationFrame(stop)
|
||||
staticx = false
|
||||
}
|
||||
} else {
|
||||
startSakura()
|
||||
}
|
||||
@@ -177,7 +179,7 @@ function createSakura() {
|
||||
// 销毁樱花雨
|
||||
function destroySakura() {
|
||||
const sakura = document.getElementById(idSakura)
|
||||
if (sakura && sakura.parentNode) {
|
||||
if (sakura && sakura.parentNode && sakura.parentNode.contains(sakura)) {
|
||||
sakura.parentNode.removeChild(sakura)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user