PageSourceSearch

https://www.lyleandscott.com/cdn/shop/t/458/assets/lyle-product-colour-nav.js?v=57840233543950216271788364386

js lyleandscott.com collected 2026-09-24 22:59:52 UTC 2,108 bytes, 2 lines download raw bytes

1const NAV_LINK_SELECTOR="[data-product-colour-nav]",FAMILY_CACHE_PREFIX="lyle-colour-family:";let bound=!1;export function setColourFamilyCache(familyTag,products){if(!(!familyTag||!products?.length))try{sessionStorage.setItem(`${FAMILY_CACHE_PREFIX}${familyTag}`,JSON.stringify(products))}catch{}}export function getColourFamilyCache(familyTag){if(!familyTag)return null;try{const raw=sessionStorage.getItem(`${FAMILY_CACHE_PREFIX}${familyTag}`);if(!raw)return null;const products=JSON.parse(raw);return Array.isArray(products)&&products.length?products:null}catch{return null}}export function bindProductColourNav(){bound||(bound=!0,document.addEventListener("click",onClick),document.addEventListener("pointerover",onPointerOver))}function onClick(e){const link=e.target.closest(NAV_LINK_SELECTOR);if(link&&!e.defaultPrevented&&!(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.button!==0)){if(link.classList.contains("is-active")||link.getAttribute("aria-current")==="page"||link.hasAttribute("disabled")){e.preventDefault();return}link.hasAttribute("data-swatch")&&trackColourSuccess()}}function onPointerOver(e){const link=e.target.closest(NAV_LINK_SELECTOR);link?.href&&(link.classList.contains("is-active")||link.getAttribute("aria-current")==="page"||isSameOriginProductUrl(link.href)&&prefetchImagesFromLink(link))}function prefetchImagesFromLink(link){const raw=link.dataset.prefetchImages;if(raw)try{const urls=JSON.parse(raw);if(!Array.isArray(urls))return;for(const src of urls.slice(0,3)){if(!src)continue;const img=new Image;img.decoding="async",img.src=src}}catch{}}function isSameOriginProductUrl(url){try{const parsed=new URL(url,window.location.origin);return parsed.origin!==window.location.origin?!1:/\/products\//.test(parsed.pathname)}catch{return!1}}function trackColourSuccess(){if(typeof window.gtag=="function"){window.gtag("event","pdp_colour_success");return}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"pdp_colour_success"})}bindProductColourNav();
2//# sourceMappingURL=/cdn/shop/t/458/assets/lyle-product-colour-nav.js.map?v=57840233543950216271788364386

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.