mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 05:20:01 -04:00
Fix name UV config is not defined
This commit is contained in:
parent
5270ad40ab
commit
d72028ce78
2 changed files with 7 additions and 4 deletions
3
augment.d.ts
vendored
3
augment.d.ts
vendored
|
@ -1,3 +0,0 @@
|
||||||
declare global {
|
|
||||||
var __uv$config: any;
|
|
||||||
}
|
|
|
@ -2,6 +2,12 @@
|
||||||
import { RammerheadEncode } from "./RammerheadEncode";
|
import { RammerheadEncode } from "./RammerheadEncode";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface Window {
|
||||||
|
__uv$config: any;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function ProxyFrame(props: { url: string }) {
|
export function ProxyFrame(props: { url: string }) {
|
||||||
// pass the URL encoded with encodeURIcomponent
|
// pass the URL encoded with encodeURIcomponent
|
||||||
var localProxy = localStorage.getItem("proxy") || "automatic";
|
var localProxy = localStorage.getItem("proxy") || "automatic";
|
||||||
|
@ -18,7 +24,7 @@ export function ProxyFrame(props: { url: string }) {
|
||||||
});
|
});
|
||||||
} else if (localProxy === "ultraviolet") {
|
} else if (localProxy === "ultraviolet") {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
__uv$config.prefix + __uv$config.encodeUrl(decodedUrl);
|
window.__uv$config.prefix + window.__uv$config.encodeUrl(decodedUrl);
|
||||||
}
|
}
|
||||||
}, [localProxy]);
|
}, [localProxy]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue