File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 7
7
<script type="text/javascript">
8
8
//<![CDATA[
9
9
(function(){
10
- function replaceHtmlClass(regexp, str) {
11
- var h = document.documentElement;
12
- h.className = h.className.replace(regexp, str);
13
- }
14
-
15
- replaceHtmlClass(/no-js/, 'js');
16
-
17
- if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
18
- replaceHtmlClass(/no-js-animation/, 'js-animation');
19
- }
10
+ const html = document.documentElement;
11
+ html.className = html.className.replace(/no-js/, 'js');
12
+ <?php
13
+ if ( ! isset ( $ _GET ['js_animation ' ] ) || $ _GET ['js_animation ' ] !== 'false ' ) :
14
+ ?>
15
+ if (!window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
16
+ html.className = html.className.replace(/no-js-animation/, 'js-animation');
17
+ }
18
+ <?php
19
+ endif ;
20
+ ?>
20
21
})();
21
22
//]]>
22
23
</script>
You can’t perform that action at this time.
0 commit comments