From 7a49044680b4841f5951c791adef8c1bcaa0fe0d Mon Sep 17 00:00:00 2001 From: Nicolas Langle Date: Wed, 5 Mar 2025 15:21:12 +0100 Subject: [PATCH] fix (header): prevent uncached page with php param --- header.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/header.php b/header.php index 3938d8b4..1c35a7d3 100644 --- a/header.php +++ b/header.php @@ -9,15 +9,10 @@ (function(){ const html = document.documentElement; html.className = html.className.replace(/no-js/, 'js'); - - if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) { - html.className = html.className.replace(/no-js-animation/, 'js-animation'); - } - + + if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches && !window.location.hash.includes('no-js-animation')) { + html.className = html.className.replace(/no-js-animation/, 'js-animation'); + } })(); //]]>