(function(){function r(){const n=[];document.querySelectorAll("*").forEach(e=>{const i=getComputedStyle(e).position;(i==="fixed"||i==="sticky")&&(n.push({el:e,original:e.style.visibility}),e.style.visibility="hidden")});let l=!1;return()=>{if(!l){l=!0;for(const{el:e,original:i}of n)e.style.visibility=i}}}let t=null;chrome.runtime.onMessage.addListener((n,l,e)=>{const i=n;return i.kind==="fullpage-begin"?(t==null||t(),t=r(),e({kind:"fullpage-begin-ack"}),!0):i.kind==="fullpage-end"?(t==null||t(),t=null,e({kind:"fullpage-end-ack"}),!0):i.kind==="scroll-to"?(window.scrollTo(0,i.y),requestAnimationFrame(()=>requestAnimationFrame(()=>e({kind:"scroll-done",pageW:document.documentElement.scrollWidth,pageH:document.documentElement.scrollHeight,viewportW:window.innerWidth,viewportH:window.innerHeight,dpr:window.devicePixelRatio||1}))),!0):!1});
})()
