PageSourceSearch

https://publicholidays.global/wp-content/themes/bb-phg/js/lazy-images.js?ver=7.1

js publicholidays.global collected 2026-10-02 20:32:04 UTC 1,240 bytes, 42 lines download raw bytes

1( function() {
2	var lazyLoadContainer = function() {
3		//for now it works only with background images
4		var containers = this.getElementsByClassName( 'travel__image' );
5
6		for ( var i = 0; i < containers.length; i++ ) {
7			var container		= containers[ i ];
8			var backgroundImage = container.getAttribute( 'data-background-image-url' );
9
10			if ( backgroundImage ) {
11				if ( lazyElementShouldLoad( container, 1 ) ) {
12					container.removeAttribute( 'data-background-image-url' );
13
14					container.style.backgroundImage = 'url(' + backgroundImage + ')';
15				}
16			}
17		}
18	};
19
20	if ( 'ready' === document.readyState ) {
21		lazyLoadContainer();
22	} else {
23		document.addEventListener( 'DOMContentLoaded', lazyLoadContainer );
24	}
25
26	document.addEventListener( 'scroll', lazyLoadContainer );
27	document.addEventListener( 'resize', lazyLoadContainer );
28
29	var scrollableContainerSelectors = [
30		'.tiles-shortcode',
31		'#row-tiles',
32		'#row-imported_posts'
33	];
34
35	for ( var i in scrollableContainerSelectors ) {
36		var scrollableContainers = document.querySelectorAll( scrollableContainerSelectors[ i ] );
37
38		for ( var j = 0; j < scrollableContainers.length; j++ ) {
39			scrollableContainers[ j ].addEventListener( 'scroll', lazyLoadContainer );
40		}
41	}
42} )();

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.