PageSourceSearch

https://thesmartlocal.com/vietnam/wp-content/plugins/tsl_newsletter/js/newsletter-spotlight.js

js thesmartlocal.com collected 2026-10-02 03:06:18 UTC 1,445 bytes, 44 lines download raw bytes

1(function($) {
2	function isInViewport(element) {
3		// Get the bounding element rectangle position in the viewport
4		var bounding = element.getBoundingClientRect();
5
6		// Checking if it's FULLY visible.
7		if (bounding.top >= 0 
8			&& bounding.left >= 0
9			&& bounding.right <= (window.innerWidth || document.documentElement.clientWidth)
10			&& bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight)) {
11			return true;
12		}
13
14		return false;
15	}
16	
17	var newsletterFocus = false;
18	var newsletterUnfocus = false;
19
20	// $(document).on('ready', function() {
21	// 	var body = document.querySelector('body');
22
23	// 	window.addEventListener('scroll', function(event) {
24	// 		var element = document.querySelector('.hustle-ui');
25	// 		if (element != null) {
26	// 			element.style.cssText = 'z-index: 2; position: relative;';
27	
28	// 			let div = document.createElement('div');
29	// 			div.setAttribute("id", "newsletter-overlay");
30	// 			div.style.cssText = 'background-color: rgba(0, 0, 0, 0.4); height: 100vh; width: 100vw; position: fixed; top: 0px; left: 0px; z-index: 1;';
31	
32	// 			if (element && !newsletterFocus && isInViewport(element)) {
33	// 				body.prepend(div);
34	// 				newsletterFocus = true;
35	// 			}
36					
37	// 			if (!isInViewport(element) && newsletterFocus && !newsletterUnfocus) {
38	// 				document.querySelector('#newsletter-overlay').remove();
39	// 				newsletterUnfocus = true;
40	// 			}
41	// 		}
42	// 	});
43	// });
44})(jQuery);

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.