PageSourceSearch

https://www.icems2017.org/wp-content/themes/Myth/js/skip-link-focus-fix.js?ver=20130115

js icems2017.org collected 2026-10-07 21:33:47 UTC 844 bytes, 32 lines download raw bytes

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

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.