-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1 lines (1 loc) · 3.29 KB
/
index.html
File metadata and controls
1 lines (1 loc) · 3.29 KB
1
<!doctype html><html lang="en"><head><script>!async function(){const a="WH_APP_VERSION";!function(){const a=new URL(window.location.href);a.searchParams.has("v")&&(a.searchParams.delete("v"),a.searchParams.delete("cb"),window.history.replaceState({},"",a.pathname+a.hash))}();try{const e=await async function(){const a=await fetch("/version.json?cb="+Date.now(),{cache:"no-store"});if(!a.ok)throw new Error("version.json "+a.status);const{version:e}=await a.json();if(!e)throw new Error("Missing version field");return e}();if(localStorage.getItem(a)!==e)return localStorage.setItem(a,e),await async function(){try{if("serviceWorker"in navigator){const a=await navigator.serviceWorker.getRegistrations();await Promise.all(a.map(a=>a.unregister().catch(()=>{})))}if(window.caches&&caches.keys){const a=await caches.keys();await Promise.all(a.map(a=>caches.delete(a).catch(()=>{})))}}catch(a){}}(),void function(a){const e=new URL(window.location.href);e.searchParams.set("v",a),e.searchParams.set("cb",Date.now()),window.location.replace(e.toString())}(e)}catch(a){console.warn("[freshness] version check failed:",a?.message||a)}}()</script><script async src="https://www.googletagmanager.com/gtag/js?id=G-186LGCDXRG"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-186LGCDXRG")</script><meta charset="utf-8"/><link rel="icon" href="/Icons%20and%20Logos/Logo.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="by Watches House"/><link rel="apple-touch-icon" href="/Logo.png"/><link rel="manifest" href="/manifest.json"/><title>Watches House</title><script defer="defer" src="/static/js/main.379d0ac5.js"></script><link href="/static/css/main.4270a739.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>function saveScrollPosition(o){const t=window.pageYOffset||document.documentElement.scrollTop;window.scrollPositions[o]=t,console.log("SAVED scroll position for "+o+": "+t+"px");try{sessionStorage.setItem("scrollPosition_"+o,t.toString())}catch(o){console.error("Error saving to sessionStorage:",o)}}function restoreScrollPosition(o){let t=window.scrollPositions[o];if(void 0===t)try{const s=sessionStorage.getItem("scrollPosition_"+o);s&&(t=parseInt(s,10))}catch(o){}void 0===t||t<=0||(console.log("RESTORING scroll position for "+o+": "+t+"px"),window.scrollTo(0,t),setTimeout(function(){window.scrollTo(0,t)},50),setTimeout(function(){window.scrollTo(0,t)},100),setTimeout(function(){window.scrollTo(0,t)},200),setTimeout(function(){window.scrollTo(0,t)},500),setTimeout(function(){window.scrollTo(0,t)},1e3))}window.scrollPositions={},document.addEventListener("click",function(o){o.target.closest('a[href^="#/product/"]')&&"#/store"===window.location.hash&&saveScrollPosition("store")},!1),window.addEventListener("popstate",function(){"#/store"===window.location.hash&&setTimeout(function(){restoreScrollPosition("store")},100)});let lastHash=window.location.hash;const hashCheckInterval=setInterval(function(){window.location.hash!==lastHash&&("#/store"===window.location.hash&&setTimeout(function(){restoreScrollPosition("store")},100),lastHash=window.location.hash)},100)</script></body></html>