From b4fc6f4e4a060701432fae256e187d9b53385b75 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 9 Sep 2023 13:29:36 -0700 Subject: [PATCH] Respect prefers-reduced-motion --- index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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'); -- 2.47.3