mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 23:30:00 -04:00
function proxy jank
This commit is contained in:
parent
39d880cbca
commit
16e0cc39c9
2 changed files with 6 additions and 7 deletions
|
@ -4,11 +4,9 @@ import { rewriteJs } from "../../shared";
|
||||||
function rewriteFunction(ctx: ProxyCtx, client: ScramjetClient) {
|
function rewriteFunction(ctx: ProxyCtx, client: ScramjetClient) {
|
||||||
const stringifiedFunction = ctx.call().toString();
|
const stringifiedFunction = ctx.call().toString();
|
||||||
|
|
||||||
const content = rewriteJs(
|
const content =
|
||||||
`return ${stringifiedFunction}`,
|
"return " + rewriteJs(`return ${stringifiedFunction}`, false, client.meta);
|
||||||
false,
|
console.log(content);
|
||||||
client.meta
|
|
||||||
);
|
|
||||||
ctx.return(ctx.fn(content)());
|
ctx.return(ctx.fn(content)());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,9 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
set(t, p, v) {
|
set(t, p, v) {
|
||||||
console.log(p, v);
|
try {
|
||||||
self[p] = v;
|
self[p] = v;
|
||||||
|
} catch {}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue