PageSourceSearch

https://sisi-woman.ru/wp-content/themes/sisi/assets/js/skip-link-focus-fix.js?ver=20170412

js sisi-woman.ru collected 2026-10-05 00:34:23 UTC 1,079 bytes, 39 lines download raw bytes

1/**
2 * Makes "skip to content" link work correctly in IE9, Chrome, and Opera
3 * for better accessibility.
4 *
5 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/
6 */
7
8
9 ( function() {
10    "use strict";
11
12	var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
13		isOpera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
14		isIE     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
15
16	if ( ( isWebkit || isOpera || isIE ) && document.getElementById && window.addEventListener ) {
17		window.addEventListener( 'hashchange', function() {
18			var id = location.hash.substring( 1 ),
19				element;
20
21			if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
22				return;
23			}
24
25			element = document.getElementById( id );
26
27			if ( element ) {
28				if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
29					element.tabIndex = -1;
30				}
31
32				element.focus();
33
34				// Repositions the window on jump-to-anchor to account for admin bar and border height.
35				window.scrollBy( 0, -53 );
36			}
37		}, false );
38	}
39} )();

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.