PageSourceSearch

https://www.ursulinky.sk/wp-content/themes/leanex-lite/js/skip-link-focus-fix.js?ver=1.2.5

js ursulinky.sk collected 2026-10-02 22:51:13 UTC 928 bytes, 34 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'use strict';
10	var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
11	    is_opera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
12	    is_ie     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
13
14	if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
15		window.addEventListener( 'hashchange', function() {
16			var id = location.hash.substring( 1 ),
17				element;
18
19			if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
20				return;
21			}
22
23			element = document.getElementById( id );
24
25			if ( element ) {
26				if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
27					element.tabIndex = -1;
28				}
29
30				element.focus();
31			}
32		}, false );
33	}
34})();

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.