PageSourceSearch

https://rathgormack.ie/wp-content/themes/entrada/dist/js/components/skip-link-focus-fix.js?ver=1758048344

js rathgormack.ie collected 2026-10-10 02:16:14 UTC 979 bytes, 38 lines download raw bytes

1(function($) {
2	'use strict';
3
4	/**
5	 * skip-link-focus-fix.js
6	 *
7	 * Helps with accessibility for keyboard only users.
8	 *
9	 * Learn more: https://github.com/Automattic/Entrada/pull/136
10	 */
11	( function() {
12		var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
13		    is_opera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
14		    is_ie     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
15
16		if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
17			window.addEventListener( 'hashchange', function() {
18				var id = location.hash.substring( 1 ),
19					element;
20
21				if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
22					return;
23				}
24
25				element = document.getElementById( id );
26
27				if ( element ) {
28					if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
29						element.tabIndex = -1;
30					}
31
32					element.focus();
33				}
34			}, false );
35		}
36	})();
37	
38}(jQuery));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.