This commit is contained in:
Rizky 2024-04-01 13:47:10 +07:00
parent cb53649e8d
commit cc2fc2e77c
2 changed files with 15 additions and 11 deletions

File diff suppressed because one or more lines are too long

View File

@ -50,6 +50,10 @@ export const Root = () => {
let url = `${w._prasi.basepath}_prasi/code/index.js`; let url = `${w._prasi.basepath}_prasi/code/index.js`;
if (url.startsWith("//")) url = url.substring(1); if (url.startsWith("//")) url = url.substring(1);
const cur = new URL(location.href);
if (url.startsWith("/")) {
url = `${cur.protocol}//${cur.host}${url}`;
}
const fn = new Function("callback", `import("${url}").then(callback)`); const fn = new Function("callback", `import("${url}").then(callback)`);
await new Promise<void>((resolve) => { await new Promise<void>((resolve) => {