PageSourceSearch

https://www.encca.eu/wp-content/themes/stackable/js/skip-link-focus-fix.js?ver=20130115

js encca.eu collected 2026-09-26 02:32:57 UTC 880 bytes, 33 lines download raw bytes

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

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.