"use strict";"string"!=typeof window.oldCode&&(window.oldCode=(document.querySelector("body > pre")||document.body).textContent,chrome.runtime.onConnect.addListener(port=>{"downloadSelf"===port.name&&(port.onMessage.addListener(async({id:e,force})=>{const msg={id:e};try{const code=await(await fetch(location.href,{mode:"same-origin"})).text();(code!==window.oldCode||force)&&(msg.code=window.oldCode=code)}catch(e){msg.error=e.message||`${e}`}port.postMessage(msg)}),addEventListener("pagehide",()=>port.disconnect(),{once:!0}))})),window;