PageSourceSearch

https://silveroak.com/cdn/shop/t/124/assets/tock-modal.js?v=12734920506282301091790686159

js silveroak.com collected 2026-10-03 19:10:16 UTC 3,349 bytes, 2 lines download raw bytes

1const TOCK_SCRIPT_URL="https://www.exploretock.com/tock.js",SETTINGS_ELEMENT_ID="tock-modal-settings",RESERVED_SEGMENTS=new Set(["experience","offering","event","search","gift","giftcard"]),EXPERIENCE_PARAMS=["experienceId","experience_id","experience"];function readSettings(){const element=document.getElementById(SETTINGS_ELEMENT_ID);if(!element?.textContent)return{suffix:""};try{const parsed=JSON.parse(element.textContent);return{suffix:typeof parsed.suffix=="string"?parsed.suffix:""}}catch{return{suffix:""}}}function isTockHost(hostname){return hostname==="exploretock.com"||hostname.endsWith(".exploretock.com")}function businessFromUrl(url){const[segment]=url.pathname.split("/").filter(Boolean);return!segment||segment.includes(".")||RESERVED_SEGMENTS.has(segment)?"":segment}function experienceFromUrl(url){const segments=url.pathname.split("/").filter(Boolean),index=segments.indexOf("experience"),fromPath=index===-1?"":segments[index+1]??"";if(/^\d+$/.test(fromPath))return fromPath;for(const param of EXPERIENCE_PARAMS){const value=url.searchParams.get(param)??"";if(/^\d+$/.test(value))return value}return""}function decorate(root,suffix2){const businesses=new Set;for(const link of root.querySelectorAll('a[href*="exploretock.com"]')){if(!(link instanceof HTMLAnchorElement))continue;let url;try{url=new URL(link.href,window.location.origin)}catch{continue}if(!isTockHost(url.hostname))continue;const business=businessFromUrl(url);if(!business||(businesses.add(business+suffix2),link.dataset.tockReserve==="true"))continue;link.dataset.tockBusiness=business+suffix2;const experience=link.dataset.tockExperience||experienceFromUrl(url);experience&&(link.dataset.tockExperience=experience),link.dataset.tockReserve="true"}return businesses}const initialised=new Set;function loadTockScript(businesses){(function(t,o,c,k){if(!t.tock){var e=t.tock=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),e.push=e,e.loaded=!0,e.version="1.0",e.queue=[];var f=o.createElement(c);f.async=!0,f.src=k;var g=o.getElementsByTagName(c)[0];g.parentNode.insertBefore(f,g)}})(window,document,"script",TOCK_SCRIPT_URL);for(const business of businesses)initialised.has(business)||(initialised.add(business),window.tock("init",business))}let scrollPositionPreserved=!1;function preserveScrollPosition(){if(scrollPositionPreserved)return;scrollPositionPreserved=!0;let scrollY=0;document.addEventListener("click",event=>{event.target instanceof Element&&event.target.closest("[data-tock-reserve]")&&(scrollY=window.scrollY)},!0);const body=document.body;new MutationObserver(()=>{body.style.position==="fixed"?(!body.style.top||body.style.top==="0px")&&(body.style.top=`-${scrollY}px`):body.style.top&&(body.style.top="")}).observe(body,{attributes:!0,attributeFilter:["style"]})}const{suffix}=readSettings();function enableWithin(root){const businesses=decorate(root,suffix);businesses.size!==0&&(preserveScrollPosition(),loadTockScript(businesses))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>enableWithin(document),{once:!0}):enableWithin(document),document.addEventListener("shopify:section:load",event=>{event.target instanceof Element&&enableWithin(event.target)});
2//# sourceMappingURL=/cdn/shop/t/124/assets/tock-modal.js.map?v=12734920506282301091790686159

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.