PageSourceSearch

https://www.ud-shop.de/theme/3fe924e2d5e294c4e4d79104b6d7c846/js/ds-lazy-images/ds-lazy-images.js?1790920451

js ud-shop.de collected 2026-10-06 15:14:37 UTC 2,095 bytes, 1 lines download raw bytes

1(()=>{"use strict";let e=window.PluginBaseClass;class t extends e{static #e=this.options={productBoxLinkSelector:"a.product-name, a.product-image-link, .swag-cms-extensions-quickview-listing-button-detail a.btn"};static #t=this.imageType="jpg";init(){if(this._checkImageType(),document.querySelector("[data-search-form]")){let e=window.PluginManager.getPluginInstanceFromElement(document.querySelector("[data-search-form]"),"SearchWidget");e&&e.$emitter.subscribe("afterSuggest",this._checkImageType.bind(this))}let e=document.querySelector("[data-off-canvas-cart]");if(e){let t=window.PluginManager.getPluginInstanceFromElement(e,"OffCanvasCart");t&&t.$emitter.subscribe("offCanvasOpened",()=>{this._checkImageType()})}}update(){this._checkImageType()}_checkImageType(){var e=this._loadImages.bind(this),t=new Image;t.addEventListener("load",e),t.addEventListener("error",e),t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"}_loadImages(e){window.imageEvent=e,"load"==e.type?this.imageType="webp":this.imageType="jpeg";var t=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(e.intersectionRatio>0||null!==e.target.closest(".tns-slider")){let n=e.target;if(n.classList.contains("placeholder")){if(null==this.imageType)return;if(n.dataset.image.length<5){n.classList.remove("placeholder");return}if(n.offsetWidth<=0||n.offsetHeight<=0||(n.width=Math.floor(n.parentElement.offsetWidth),void 0===window.externalMediaUrl))return;var t="extend";n.dataset.type&&(t=n.dataset.type);var a=n.dataset.image;a.indexOf("?")>=0&&((a=n.dataset.image.split("?")).pop(),a=a.join("?"));var a=a.split("."),i=a.pop(),a=a.join("."),s=window.externalMediaUrl+t+"/"+i+"/"+parseInt(n.offsetWidth)+"/"+parseInt(n.offsetHeight)+"/"+a+"."+this.imageType,r=n.src;n.onerror=function(){n.src=r,n.classList.remove("placeholder"),n.dataset.image=null},n.src=s,n.dataset.image=null,n.classList.remove("placeholder")}}})},{}),a=document.querySelectorAll("img.placeholder");a&&a.forEach(e=>{t.observe(e)})}}window.PluginManager.register("DsLazyImages",t)})();

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.