PageSourceSearch

https://doctorstolberg.com/cdn/shop/t/46/assets/image-tilt.js?v=116828396305798606311788989889

js doctorstolberg.com collected 2026-10-08 05:49:35 UTC 1,813 bytes, 2 lines download raw bytes

1document.addEventListener("DOMContentLoaded",()=>{const wrappers=document.querySelectorAll("[data-tilt-hero-wrapper]");if(!wrappers.length)return;const mediaQuery=window.matchMedia("(min-width: 750px)");function heightRatioFor(wrapper){return(wrapper.dataset.tiltAspect||"4-5")==="5-4"?4/5:5/4}function rotateAndScaleAll(){const width=window.innerWidth,extraWidth=Math.max(0,width-750);wrappers.forEach(wrapper=>{const image=wrapper.querySelector(".hero-image");if(!image||!mediaQuery.matches)return;const aspect=wrapper.dataset.tiltAspect||"4-5";let degMag=Math.min(aspect==="5-4"?56:45,extraWidth*(aspect==="5-4"?.11:.05));aspect==="5-4"&&(degMag=Math.max(degMag,14));const radians=degMag*Math.PI/180,rotationDeg=aspect==="5-4"?-degMag:degMag,iw=image.offsetWidth,ih=iw*heightRatioFor(wrapper),rotatedWidth=Math.abs(iw*Math.cos(radians))+Math.abs(ih*Math.sin(radians)),rotatedHeight=Math.abs(iw*Math.sin(radians))+Math.abs(ih*Math.cos(radians)),scale=Math.min(1,width/rotatedWidth);wrapper.style.height=`${rotatedHeight*scale}px`,image.style.transform=`translate(-50%, -50%) rotate(${rotationDeg}deg) scale(${scale})`})}let resizeRaf=0;function onResize(){cancelAnimationFrame(resizeRaf),resizeRaf=requestAnimationFrame(rotateAndScaleAll)}function resetAll(){wrappers.forEach(wrapper=>{const image=wrapper.querySelector(".hero-image");image&&(image.style.transform="",wrapper.style.height="",wrapper.style.transform="",image.style.left="",image.style.top="")})}function handleTabletChange(e){e.matches?(rotateAndScaleAll(),window.addEventListener("resize",onResize)):(window.removeEventListener("resize",onResize),resetAll())}mediaQuery.addEventListener("change",handleTabletChange),handleTabletChange(mediaQuery)});
2//# sourceMappingURL=/cdn/shop/t/46/assets/image-tilt.js.map?v=116828396305798606311788989889

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.