forked from unimatrix/web
1 line
634 B
JavaScript
1 line
634 B
JavaScript
(()=>{if(window.parent===window)return;const allowed=new Set(['https://shop.dunerealms.com','https://www.dunerealms.com','https://dunerealms.com','https://cp.dunerealms.com']);let origin;try{origin=new URL(document.referrer).origin;}catch{}if(!allowed.has(origin))return;const send=()=>parent.postMessage({type:'dune-shop-size',height:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},origin);window.addEventListener('message',e=>{if(e.origin===origin&&e.source===parent&&e.data?.type==='dune-shop-measure')send();});window.addEventListener('load',send);new ResizeObserver(send).observe(document.body);})();
|

Staff