PageSourceSearch

https://metaledgemag.com/cdn/shop/t/28/assets/fh-breadcrumbs.js?v=163191264040479183881787768183

js metaledgemag.com collected 2026-10-02 07:54:57 UTC 3,508 bytes, 10 lines download raw bytes

1/*!
2 * ===================================================
3 * WARNING: DO NOT EDIT THIS FILE DIRECTLY!
4 * This file is automatically generated by the build process.
5 * Any changes made to this file will be overwritten.
6 * ===================================================
7 */
8
9const STORAGE_KEY="lastVisitedCollection",TRUNCATE_LENGTH=40,truncateCrumb=text=>text.length<=40?text:`${text.slice(0,37)}...`,storeLastVisitedCollection=nav=>{try{if(nav.dataset.pageType!=="collection")return;const title=nav.querySelector('.fh-breadcrumbs__link[aria-current="page"]')?.textContent?.trim(),url=window.location.href.split("#")[0];if(!title||!url)return;sessionStorage.setItem(STORAGE_KEY,JSON.stringify({url,title,timestamp:Date.now()}))}catch{}},enhanceProductBreadcrumb=nav=>{try{if(nav.dataset.pageType!=="product")return;const list=nav.querySelector(".fh-breadcrumbs__list");if(!list)return;let collectionLink=null;for(const link of list.querySelectorAll(".fh-breadcrumbs__link"))if(link instanceof HTMLAnchorElement&&link.href.includes("/collections/")){collectionLink=link;break}if(!collectionLink)return;const referrer=document.referrer||"",origin=window.location.origin||"",homePath=nav.dataset.rootUrl||"/",homeUrlA=origin+homePath,homeUrlB=homeUrlA.replace(/\/$/,""),cameFromHome=referrer===homeUrlA||referrer===homeUrlB||referrer.startsWith(`${homeUrlA}?`)||referrer.startsWith(`${homeUrlB}?`)||referrer.startsWith(`${homeUrlA}#`)||referrer.startsWith(`${homeUrlB}#`),cameFromCollection=!cameFromHome&&referrer.includes("/collections/")&&!referrer.includes("/products/");if(cameFromHome){collectionLink.closest(".fh-breadcrumbs__item")?.remove();return}if(!cameFromCollection)return;const fallbackTitle=collectionLink.textContent||"";let storedTitle=null,storedFresh=!1;try{const storedRaw=sessionStorage.getItem(STORAGE_KEY);if(storedRaw){const storedData=JSON.parse(storedRaw),maxAge=3600*1e3;storedData?.title&&storedData?.timestamp&&Date.now()-storedData.timestamp<maxAge&&(storedTitle=String(storedData.title),storedFresh=!0)}}catch{}let derivedTitle=null,refHandle=null;try{let refPath=referrer;origin&&refPath.startsWith(origin)&&(refPath=refPath.slice(origin.length));const collectionsSplit=refPath.split("/collections/");collectionsSplit.length>1&&(refHandle=decodeURIComponent(collectionsSplit[1]?.split(/[/?#]/)[0]||""),refHandle&&(derivedTitle=refHandle.split("-").map(word=>word.length>0?word.charAt(0).toUpperCase()+word.slice(1):word).join(" ")))}catch{}let safeReferrerUrl=null;try{new URL(referrer,window.location.origin).origin===window.location.origin&&(safeReferrerUrl=referrer)}catch{}if(safeReferrerUrl&&collectionLink.setAttribute("href",safeReferrerUrl),storedFresh&&storedTitle){collectionLink.textContent=truncateCrumb(storedTitle);return}if(refHandle){fetch(`/collections/${encodeURIComponent(refHandle)}.json`).then(res=>res.ok?res.json():null).then(data=>{collectionLink.textContent=truncateCrumb(data?.collection?.title?String(data.collection.title):derivedTitle||fallbackTitle)}).catch(()=>{collectionLink.textContent=truncateCrumb(derivedTitle||fallbackTitle)});return}collectionLink.textContent=truncateCrumb(derivedTitle||fallbackTitle)}catch{}},initBreadcrumbs=()=>{const nav=document.querySelector(".fh-breadcrumbs");nav instanceof HTMLElement&&(storeLastVisitedCollection(nav),enhanceProductBreadcrumb(nav))};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",initBreadcrumbs):initBreadcrumbs();
10//# sourceMappingURL=fh-breadcrumbs.js.map

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.