I think this will work?

This commit is contained in:
wearrrrr 2024-02-25 18:09:24 -06:00
parent 872f46798a
commit d5ecbaadac

View file

@ -53,7 +53,12 @@
} }
iframe.style.pointerEvents = "auto"; iframe.style.pointerEvents = "auto";
iframe.classList.add("proxy-frame"); iframe.classList.add("proxy-frame");
document.body.appendChild(iframe); try {
document.body.appendChild(iframe);
} catch {
window.open(iframe.src);
}
iframeURLChange(iframe, (newURL) => updateTopbarURL(preference, newURL)); iframeURLChange(iframe, (newURL) => updateTopbarURL(preference, newURL));
const boundIFrameLoad = iframeLoad.bind(null, iframe, loadingContent, topbar, closeButton); const boundIFrameLoad = iframeLoad.bind(null, iframe, loadingContent, topbar, closeButton);
iframe.addEventListener("load", boundIFrameLoad); iframe.addEventListener("load", boundIFrameLoad);