From: Ruben Beltran del Rio Date: Mon, 9 Sep 2024 20:05:04 +0000 (+0200) Subject: Simplify reduce motion check X-Git-Url: https://git.r.bdr.sh/rbdr/r.bdr.sh/commitdiff_plain/92984c46263aee10ab6a6bb179ab9c174075895b?ds=sidebyside Simplify reduce motion check --- diff --git a/js/animation.js b/js/animation.js index ee43c54..23d3ca5 100644 --- a/js/animation.js +++ b/js/animation.js @@ -1,6 +1,6 @@ (function () { - if (window.matchMedia(`(prefers-reduced-motion: reduce)`).matches === true) return; + if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return var K = document.querySelector('canvas'), { random: R, PI, cos: C, sin: S, atan2: A } = Math,