check for existing canvas
This commit is contained in:
@ -57,6 +57,11 @@ observer.observe(document.body, {
|
||||
|
||||
|
||||
function initializeCanvas() {
|
||||
if (document.getElementById('snowfallCanvas')) {
|
||||
console.warn('Canvas bereits vorhanden.');
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.querySelector('.snowstorm-container');
|
||||
if (!container) {
|
||||
console.error('Error: No element with class "snowfall-container" found.');
|
||||
|
Reference in New Issue
Block a user