()
| 179 | // ── Animations ─────────────────────────────────────────────────────────────── |
| 180 | |
| 181 | function startCatAnimation() { |
| 182 | catAnimInterval = setInterval(() => { |
| 183 | const cat = document.createElement("div"); |
| 184 | cat.style.cssText = ` |
| 185 | position: fixed; font-size: ${2 + Math.random() * 2}rem; z-index: 999; |
| 186 | pointer-events: none; top: ${Math.random() * 100}vh; left: -100px; |
| 187 | animation: catSlide ${3 + Math.random() * 2}s linear forwards; |
| 188 | `; |
| 189 | cat.textContent = pick(CAT_EMOJIS); |
| 190 | document.body.appendChild(cat); |
| 191 | setTimeout(() => cat.parentNode && cat.remove(), 6000); |
| 192 | }, 400); |
| 193 | } |
| 194 | |
| 195 | function stopCatAnimation() { |
| 196 | clearInterval(catAnimInterval); |
no test coverage detected