Fix name UV config is not defined

This commit is contained in:
rift 2023-12-21 10:30:49 -06:00
parent 5270ad40ab
commit d72028ce78
2 changed files with 7 additions and 4 deletions

3
augment.d.ts vendored
View file

@ -1,3 +0,0 @@
declare global {
var __uv$config: any;
}

View file

@ -2,6 +2,12 @@
import { RammerheadEncode } from "./RammerheadEncode";
import { useEffect, useState } from "preact/hooks";
declare global {
interface Window {
__uv$config: any;
}
}
export function ProxyFrame(props: { url: string }) {
// pass the URL encoded with encodeURIcomponent
var localProxy = localStorage.getItem("proxy") || "automatic";
@ -18,7 +24,7 @@ export function ProxyFrame(props: { url: string }) {
});
} else if (localProxy === "ultraviolet") {
window.location.href =
__uv$config.prefix + __uv$config.encodeUrl(decodedUrl);
window.__uv$config.prefix + window.__uv$config.encodeUrl(decodedUrl);
}
}, [localProxy]);