PageSourceSearch

https://tamworthdistilling.com/wp-content/plugins/theplus_elemento…/lazy_load/tp-lazy_load.js?ver=1790090321

js tamworthdistilling.com collected 2026-09-24 21:45:17 UTC 1,579 bytes, 59 lines download raw bytes

1"use strict";
2function onDocumentLoaded(cb){
3	if (/comp|inter|loaded/.test(document.readyState)) {
4		cb()
5	} else {
6		document.addEventListener('DOMContentLoaded', cb, false)
7	}
8}
9
10onDocumentLoaded(() => {
11	if (document.querySelector('img.tp-lazyload')) {
12		tp_lazy_load()
13	}
14	var lazyBackgrounds = [].slice.call(document.querySelectorAll(".lazy-background"));
15
16	  if (lazyBackgrounds && "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype) {
17		let lazyBackgroundObserver = new IntersectionObserver(function(entries, observer) {
18		  entries.forEach(function(entry) {
19			if (entry.isIntersecting) {
20			  entry.target.classList.remove("lazy-background");
21			  lazyBackgroundObserver.unobserve(entry.target);
22			}
23		  });
24		});
25
26		lazyBackgrounds.forEach(function(lazyBackground) {
27		  lazyBackgroundObserver.observe(lazyBackground);
28		});
29	  }
30});
31
32let lz = null
33
34function tp_lazy_load(){
35	if (lz) {
36		lz.update()
37		return
38	}
39	var lazy_enter = function ( e ) {
40		e.classList.add('tp-lazy-start');
41	};
42	var lazy_loading = function ( e ) {
43		e.classList.remove('tp-lazy-start');
44		e.classList.add('tp-lazy-loading');
45	};
46	var lazy_loaded = function ( e ) {
47		e.classList.remove('tp-lazy-loading');
48		e.classList.add('tp-lazy-loaded');
49		delete e.dataset.srcset;
50	};
51	
52	lz = new LazyLoad({
53		elements_selector: "img.tp-lazyload",
54		callback_enter: lazy_enter,
55		callback_loading: lazy_loading,
56		callback_loaded: lazy_loaded,
57	});
58	
59};

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.