fix: dont inject scramjet scripts when using domparser

This commit is contained in:
Percs 2024-10-07 10:29:01 -05:00
parent ebf3c9c4c4
commit ff62755fa1

View file

@ -264,7 +264,7 @@ export default function (client: ScramjetClient, self: typeof window) {
ctx.args[0], ctx.args[0],
client.cookieStore, client.cookieStore,
client.meta, client.meta,
true false
); );
} }
}, },
@ -283,12 +283,11 @@ export default function (client: ScramjetClient, self: typeof window) {
client.Proxy("document.writeln", { client.Proxy("document.writeln", {
apply(ctx) { apply(ctx) {
// this injects scramjet multiple times but who gaf
ctx.args[0] = rewriteHtml( ctx.args[0] = rewriteHtml(
ctx.args[0], ctx.args[0],
client.cookieStore, client.cookieStore,
client.meta, client.meta,
true false
); );
}, },
}); });