PageSourceSearch

https://isto.pt/cdn/shop/t/11/assets/magnify.js?v=104947768448827820581782122252

js isto.pt collected 2026-09-26 01:54:41 UTC 2,561 bytes, 2 lines download raw bytes

1let overlay;function getZoomSource(image){return image.closest(".product__media")?.dataset.zoomSrc||image.currentSrc||image.src}function getZoomWidth(image){const parent=image.closest(".product__media"),width=parseInt(parent?.dataset.zoomWidth,10);if(width)return width;try{const fromUrl=parseInt(new URL(getZoomSource(image)).searchParams.get("width"),10);if(fromUrl)return fromUrl}catch{}return image.naturalWidth||image.clientWidth}function getZoomRatio(image,preferredMax=3){const displayWidth=image.clientWidth,hiResWidth=getZoomWidth(image);if(!displayWidth||!hiResWidth)return Math.min(preferredMax,2);const maxWithoutUpscale=hiResWidth/displayWidth;return Math.min(preferredMax,maxWithoutUpscale)}function createOverlay(image,hiResSrc){const overlayImage=document.createElement("img");return overlayImage.setAttribute("src",hiResSrc),overlay=document.createElement("div"),prepareOverlay(overlay,hiResSrc),image.style.opacity="50%",toggleLoadingSpinner(image),overlayImage.onload=()=>{toggleLoadingSpinner(image),image.parentElement.insertBefore(overlay,image),image.style.opacity="100%"},overlay}function prepareOverlay(container,srcUrl){container.setAttribute("class","image-magnify-full-size"),container.setAttribute("aria-hidden","true"),container.style.backgroundImage=`url('${srcUrl}')`,container.style.backgroundColor="var(--gradient-background)"}function toggleLoadingSpinner(image){image.parentElement.parentElement.querySelector(".loading__spinner").classList.toggle("hidden")}function moveWithHover(image,event,zoomRatio){const ratio=image.clientHeight/image.clientWidth,container=event.target.getBoundingClientRect(),xPosition=event.clientX-container.left,yPosition=event.clientY-container.top,xPercent=`${xPosition/(image.clientWidth/100)}%`,yPercent=`${yPosition/(image.clientWidth*ratio/100)}%`;overlay.style.backgroundPosition=`${xPercent} ${yPercent}`,overlay.style.backgroundSize=`${image.clientWidth*zoomRatio}px`}function magnify(image,zoomRatio){const hiResSrc=getZoomSource(image),overlayEl=createOverlay(image,hiResSrc);overlayEl.onclick=()=>overlayEl.remove(),overlayEl.onmousemove=event=>moveWithHover(image,event,zoomRatio),overlayEl.onmouseleave=()=>overlayEl.remove()}function enableZoomOnHover(preferredMax=3){document.querySelectorAll(".image-magnify-hover").forEach(image=>{image.onclick=event=>{const zoomRatio=getZoomRatio(image,preferredMax);magnify(image,zoomRatio),moveWithHover(image,event,zoomRatio)}})}enableZoomOnHover(3);
2//# sourceMappingURL=/cdn/shop/t/11/assets/magnify.js.map?v=104947768448827820581782122252

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.