(function(){(function(){function i(){const s=new URL(window.location.href).searchParams.get("gitea-iframe-id"),a=(e,t={})=>{window.parent.postMessage({giteaIframeCmd:e,giteaIframeId:s,...t},"*")},r=()=>a("resize",{iframeHeight:document.documentElement.scrollHeight});r(),window.addEventListener("DOMContentLoaded",r),setInterval(r,1e3);const o=(e,t)=>a("open-link",{openLink:e,anchorTarget:t});document.addEventListener("click",e=>{const t=e.target;if(t.nodeName!=="A")return;const n=t.getAttribute("href")||"";(n.startsWith(".")||n.startsWith("/")||n.startsWith("http://")||n.startsWith("https://"))&&(e.preventDefault(),o(n,t.getAttribute("target")))})}i()})(),(function(){"use strict"})()})();
