document.write why not

This commit is contained in:
velzie 2024-09-01 20:39:33 -04:00
parent d707bd7be3
commit 6e9ce2238c
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F

View file

@ -234,4 +234,27 @@ export default function (client: ScramjetClient, self: typeof window) {
return scram.documentProxy;
},
});
client.Proxy("document.write", {
apply(ctx) {
ctx.args[0] = rewriteHtml(
ctx.args[0],
client.cookieStore,
client.meta,
true
);
},
});
client.Proxy("document.writeln", {
apply(ctx) {
// this injects scramjet multiple times but who gaf
ctx.args[0] = rewriteHtml(
ctx.args[0],
client.cookieStore,
client.meta,
true
);
},
});
}