PageSourceSearch

https://www.dotandkey.com/cdn/shop/t/2264/assets/bottom-nav-bar.js?v=130015819601008364621788869840

js dotandkey.com collected 2026-10-01 00:54:15 UTC 2,673 bytes, 2 lines download raw bytes

1const POPUP_TIMEOUT_MS=18e5,SCROLL_THRESHOLD=5,publishNavHeight=bar=>{document.documentElement.style.setProperty("--bottom-nav-height",`${bar.offsetHeight}px`)},autoFloLogin=()=>{const accountLabel=document.querySelector("[data-bottom-nav-bar] [data-account-label]");accountLabel&&(accountLabel.textContent=accountLabel.closest("[data-bottom-nav-bar]").dataset.accountLoggedInLabel??"")},syncFloAccountLabel=()=>{typeof getFloAccessToken=="function"&&getFloAccessToken()&&autoFloLogin()};document.addEventListener("DOMContentLoaded",()=>{const bar=document.querySelector("[data-bottom-nav-bar]");if(!bar)return;const cartDrawer=document.querySelector("cart-drawer");let cartItemCount=parseInt(bar.dataset.cartCountValue??"0",10);publishNavHeight(bar),new ResizeObserver(()=>publishNavHeight(bar)).observe(bar),syncFloAccountLabel();const lastClosedTime=localStorage.getItem("popupClosedTime");if(lastClosedTime&&Date.now()-Number(lastClosedTime)<18e5)return;let scrollCount=0,popupShown=!1;const getPopup=()=>bar.querySelector("[data-bottom-nav-popup]"),showPopup=()=>{const popup=getPopup();popup&&(popup.classList.add("bottom-nav-bar__popup--visible"),popupShown=!0)},hidePopup=()=>{const popup=getPopup();popup&&popup.classList.remove("bottom-nav-bar__popup--visible")},handleScroll=()=>{popupShown||cartItemCount===0||(scrollCount++,scrollCount>=5&&(showPopup(),window.removeEventListener("scroll",handleScroll)))};window.addEventListener("scroll",handleScroll,{passive:!0}),bar.addEventListener("click",event=>{if(event.target.closest("[data-popup-close]")){hidePopup(),window.removeEventListener("scroll",handleScroll),localStorage.setItem("popupClosedTime",String(Date.now()));return}event.target.closest("[data-popup-footer]")&&cartDrawer?.open()});const sectionId=bar.dataset.sectionId,refreshFromCart=async()=>{if(sectionId)try{const html=(await(await fetch(`/?sections=${sectionId}`)).json())?.[sectionId];if(!html)return;const freshBar=new DOMParser().parseFromString(html,"text/html").querySelector("[data-bottom-nav-bar]");if(!freshBar)return;const wasVisible=getPopup()?.classList.contains("bottom-nav-bar__popup--visible");cartItemCount=parseInt(freshBar.dataset.cartCountValue??"0",10),bar.dataset.cartCountValue=String(cartItemCount),bar.innerHTML=freshBar.innerHTML,syncFloAccountLabel(),wasVisible&&showPopup()}catch{}};document.addEventListener("cart:rendered",refreshFromCart)}),window.addEventListener("theme:shopflo:loaded",syncFloAccountLabel),window.addEventListener("user-loggedin",event=>{const{token}=event?.detail??{};token&&autoFloLogin()});
2//# sourceMappingURL=/cdn/shop/t/2264/assets/bottom-nav-bar.js.map?v=130015819601008364621788869840

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.