fix bad URL bar default on firefox

This commit is contained in:
Spencer Pogorzelski 2023-08-14 20:50:05 -07:00
parent 517d190aa1
commit a49294de4f

View file

@ -38,7 +38,7 @@
let selectedProxy = "ultraviolet"; let selectedProxy = "ultraviolet";
let url: string; let url: string = "http://google.com";
let proxyIframe: HTMLIFrameElement; let proxyIframe: HTMLIFrameElement;
let rtcState = ""; let rtcState = "";
@ -172,11 +172,14 @@
} }
function frameLoad() { function frameLoad() {
if (!import.meta.env.VITE_ADRIFT_SINGLEFILE) { if (!import.meta.env.VITE_ADRIFT_SINGLEFILE) {
const location = proxyIframe.contentDocument?.location.href;
if (location && location != "about:blank") {
url = __uv$config.decodeUrl( url = __uv$config.decodeUrl(
proxyIframe.contentDocument?.location.href.replace(/.*\//g, "") proxyIframe.contentDocument?.location.href.replace(/.*\//g, "")
); );
} }
} }
}
(window as any).bare = new BareClient(); (window as any).bare = new BareClient();
(window as any).myWsTest = () => { (window as any).myWsTest = () => {