Fix dev server
This commit is contained in:
parent
4ea772ba18
commit
682c892f53
1 changed files with 3 additions and 4 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
import { useState, useEffect } from "preact/hooks";
|
import { useState, useEffect } from "preact/hooks";
|
||||||
import AES from "../../../node_modules/crypto-js/aes.js";
|
import CryptoJS from "crypto-js";
|
||||||
import Utf8 from "../../../node_modules/crypto-js/enc-utf8.js";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { dec } from "../../aes";
|
import { dec } from "../../aes";
|
||||||
import { ToastContainer, toast } from "react-toastify";
|
import { ToastContainer, toast } from "react-toastify";
|
||||||
|
|
@ -45,10 +44,10 @@ export function IframeHeader(props: { url: string }) {
|
||||||
.replace(window.__uv$config.prefix, "");
|
.replace(window.__uv$config.prefix, "");
|
||||||
|
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
let decodedUrl = AES.decrypt(
|
let decodedUrl = CryptoJS.AES.decrypt(
|
||||||
"U2FsdGVkX1" + encodedUrl,
|
"U2FsdGVkX1" + encodedUrl,
|
||||||
location.origin + navigator.userAgent
|
location.origin + navigator.userAgent
|
||||||
).toString(Utf8);
|
).toString(CryptoJS.enc.Utf8);
|
||||||
Clipboard(decodedUrl);
|
Clipboard(decodedUrl);
|
||||||
toast("URL copied to clipboard!");
|
toast("URL copied to clipboard!");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue