From: Ardis Lu Date: Sat, 9 Sep 2023 20:29:36 +0000 (-0700) Subject: Respect prefers-reduced-motion X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=b4fc6f4e4a060701432fae256e187d9b53385b75;p=ard.is Respect prefers-reduced-motion --- diff --git a/index.html b/index.html index f20e8cd..ad6cc51 100644 --- a/index.html +++ b/index.html @@ -122,7 +122,12 @@ asciiContainer.textContent = frames[currentFrame]; requestAnimationFrame(step); } - requestAnimationFrame(step); + if (matchMedia('(prefers-reduced-motion: reduce)').matches) { + asciiContainer.textContent = ascii; + } + else { + requestAnimationFrame(step); + } // Inject obfuscated email. To block low-effort scraping. const addr = document.querySelector('address > a');