diff --git a/src/client/dom/element.ts b/src/client/dom/element.ts index 3485311..6aec14c 100644 --- a/src/client/dom/element.ts +++ b/src/client/dom/element.ts @@ -171,8 +171,8 @@ export default function (client: ScramjetClient, self: typeof window) { // since the prototype chain is fucked const style = ctx.get() as CSSStyleDeclaration; - -return new Proxy(style, { + + return new Proxy(style, { get(t, p) { const v = Reflect.get(t, p); if (typeof v === "function") { @@ -190,8 +190,8 @@ return new Proxy(style, { if (v == "" || typeof v !== "string") { return Reflect.set(t, p, v); } - -return Reflect.set(t, p, rewriteCss(v, client.meta)); + + return Reflect.set(t, p, rewriteCss(v, client.meta)); }, }); }, diff --git a/src/client/shared/indexeddb.ts b/src/client/shared/indexeddb.ts index 6143e1d..4b57257 100644 --- a/src/client/shared/indexeddb.ts +++ b/src/client/shared/indexeddb.ts @@ -10,8 +10,8 @@ export default function (client: ScramjetClient, self: Self) { client.Trap("IDBDatabase.prototype.name", { get(ctx) { const name = ctx.get() as string; - -return name.substring(name.indexOf("@") + 1); + + return name.substring(name.indexOf("@") + 1); }, }); } diff --git a/src/client/shared/requests/xmlhttprequest.ts b/src/client/shared/requests/xmlhttprequest.ts index e13dac8..05ea88e 100644 --- a/src/client/shared/requests/xmlhttprequest.ts +++ b/src/client/shared/requests/xmlhttprequest.ts @@ -85,15 +85,15 @@ export default function (client: ScramjetClient, self: Self) { client.RawTrap(ctx.this, "response", { get() { if (ctx.this.responseType === "arraybuffer") return bodyab.buffer; - -return body; + + return body; }, }); client.RawTrap(ctx.this, "responseXML", { get() { const parser = new DOMParser(); - -return parser.parseFromString(body, "text/xml"); + + return parser.parseFromString(body, "text/xml"); }, }); client.RawTrap(ctx.this, "getAllResponseHeaders", { @@ -106,8 +106,8 @@ return parser.parseFromString(body, "text/xml"); return (header: string) => { const re = new RegExp(`^${header}: (.*)$`, "m"); const match = re.exec(headers); - -return match ? match[1] : null; + + return match ? match[1] : null; }; }, }); diff --git a/src/client/shared/wrap.ts b/src/client/shared/wrap.ts index fe9b56f..f364a12 100644 --- a/src/client/shared/wrap.ts +++ b/src/client/shared/wrap.ts @@ -66,8 +66,8 @@ export default function (client: ScramjetClient, self: typeof globalThis) { if (typeof v === "string" && v.includes("scramjet")) { debugger; } - -return v; + + return v; }; // location = "..." can't be rewritten as wrapfn(location) = ..., so instead it will actually be rewritten as diff --git a/src/shared/rewriters/html.ts b/src/shared/rewriters/html.ts index f36ec64..b176411 100644 --- a/src/shared/rewriters/html.ts +++ b/src/shared/rewriters/html.ts @@ -272,14 +272,14 @@ export function rewriteSrcset(srcset: string, meta: URLMeta) { function base64ToBytes(base64) { const binString = atob(base64); - -return Uint8Array.from(binString, (m) => m.codePointAt(0)); + + return Uint8Array.from(binString, (m) => m.codePointAt(0)); } function bytesToBase64(bytes: Uint8Array) { const binString = Array.from(bytes, (byte) => String.fromCodePoint(byte) ).join(""); - -return btoa(binString); + + return btoa(binString); }