File size: 554 Bytes
779c5fe
1
2
(async()=>{const o=document.querySelector.bind(document);"serviceWorker"in navigator&&(Number(window.localStorage.getItem("ChenBlogHelper_Set"))<1&&(window.localStorage.setItem("ChenBlogHelper_Set",1),window.stop(),document.innerHTML=""),navigator.serviceWorker.register(`/sw.js?time=${Math.ceil(Math.random()*1e19)}`).then(async()=>{Number(window.localStorage.getItem("ChenBlogHelper_Set"))<2&&setTimeout(()=>{window.localStorage.setItem("ChenBlogHelper_Set",2),window.location.reload()},500)}).catch(e=>console.error(`ChenBlogHelperError:${e}`)))})();