diff --git a/augment.d.ts b/augment.d.ts deleted file mode 100644 index 6c9e3c3..0000000 --- a/augment.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare global { - var __uv$config: any; -} diff --git a/src/ProxyFrame.tsx b/src/ProxyFrame.tsx index e60062f..42a863f 100644 --- a/src/ProxyFrame.tsx +++ b/src/ProxyFrame.tsx @@ -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]);