PageSourceSearch

https://kanal-ri.hr/wp-content/themes/reendex/js/skip-link-focus-fix.js?ver=20151215

js kanal-ri.hr collected 2026-10-02 20:38:11 UTC 905 bytes, 32 lines download raw bytes

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