PageSourceSearch

https://www.channels.app/wp-content/themes/shapely/assets/js/skip-link-focus-fix.js?ver=20160115

js channels.app collected 2026-09-24 09:44:19 UTC 779 bytes, 27 lines download raw bytes

1// jscs:ignore validateLineBreaks
2( function() {
3	var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
4	    isOpera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
5	    isIe     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
6
7	if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
8		window.addEventListener( 'hashchange', function() {
9			var id = location.hash.substring( 1 ),
10				element;
11
12			if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
13				return;
14			}
15
16			element = document.getElementById( id );
17
18			if ( element ) {
19				if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
20					element.tabIndex = -1;
21				}
22
23				element.focus();
24			}
25		}, false );
26	}
27})();

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.