PageSourceSearch

https://thekingandco.uk/wp-content/mu-plugins/ppb-core/assets/js/scroll-header.js?ver=1.9.41-4b49e79

js thekingandco.uk collected 2026-10-07 23:47:02 UTC 959 bytes, 33 lines download raw bytes

1(function () {
2	'use strict';
3
4	// IntersectionObserver required; bail on very old browsers.
5	if ( typeof window.IntersectionObserver !== 'function' ) {
6		return;
7	}
8
9	var root = document.documentElement;
10
11	// Create a 1px sentinel right at the top of the page. When it
12	// leaves the viewport, we know the user has scrolled.
13	var sentinel = document.createElement( 'div' );
14	sentinel.setAttribute( 'aria-hidden', 'true' );
15	sentinel.style.cssText = 'position:absolute;top:0;left:0;width:1px;height:1px;pointer-events:none;';
16	document.body.insertBefore( sentinel, document.body.firstChild );
17
18	var observer = new IntersectionObserver(
19		function ( entries ) {
20			for ( var i = 0; i < entries.length; i++ ) {
21				// Sentinel in viewport = at top of page.
22				// Out of viewport = scrolled past.
23				root.classList.toggle(
24					'ppb-is-scrolled',
25					! entries[ i ].isIntersecting
26				);
27			}
28		},
29		{ threshold: 0 }
30	);
31
32	observer.observe( sentinel );
33}());

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.