Add conditional check for cat glow element in animeCat.js
This commit is contained in:
@@ -105,6 +105,11 @@ window.AnimeCat = class AnimeCat {
|
||||
this.bubble.appendChild(this.bubblePointer);
|
||||
|
||||
// --- Zusammenbauen ---
|
||||
if (!this.wrapper.querySelector('#cat-glow')) {
|
||||
this.glow = document.createElement('div');
|
||||
this.glow.id = 'cat-glow';
|
||||
this.wrapper.insertBefore(this.glow, this.img); // vor das Bild
|
||||
}
|
||||
this.wrapper.appendChild(this.img);
|
||||
this.wrapper.appendChild(this.bubble);
|
||||
this.container.appendChild(this.wrapper);
|
||||
|
||||
Reference in New Issue
Block a user