support url base

This commit is contained in:
velzie 2024-09-01 13:26:24 -04:00
parent a1ce4e33b3
commit 7a9c990b01
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
32 changed files with 213 additions and 158 deletions

View file

@ -8,7 +8,7 @@ export default function (client: ScramjetClient, self: Self) {
value: function (js: any) {
if (typeof js !== "string") return js;
const rewritten = rewriteJs(js, client.url);
const rewritten = rewriteJs(js, client.meta);
return rewritten;
},
@ -23,5 +23,5 @@ export function indirectEval(this: ScramjetClient, js: any) {
const indirection = this.global.eval;
return indirection(rewriteJs(js, this.url) as string);
return indirection(rewriteJs(js, this.meta) as string);
}