Changeset 52147
- Timestamp:
- 11/12/2021 04:06:35 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/functions.php
r51820 r52147 497 497 include get_template_directory() . '/assets/js/skip-link-focus-fix.js'; 498 498 echo '</script>'; 499 } 500 501 // The following is minified via `npx terser --compress --mangle -- assets/js/skip-link-focus-fix.js`.502 ?>503 <script>504 /(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1);505 </script>506 <?php499 } else { 500 // The following is minified via `npx terser --compress --mangle -- assets/js/skip-link-focus-fix.js`. 501 ?> 502 <script> 503 /(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",(function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())}),!1); 504 </script> 505 <?php 506 } 507 507 } 508 508 add_action( 'wp_print_footer_scripts', 'twenty_twenty_one_skip_link_focus_fix' );
Note: See TracChangeset
for help on using the changeset viewer.