mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
chore: prettier.... TWO!
This commit is contained in:
parent
3436d85888
commit
0d4ee9ee96
5 changed files with 18 additions and 18 deletions
|
@ -172,7 +172,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
|||
|
||||
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") {
|
||||
|
@ -191,7 +191,7 @@ return new Proxy(style, {
|
|||
return Reflect.set(t, p, v);
|
||||
}
|
||||
|
||||
return Reflect.set(t, p, rewriteCss(v, client.meta));
|
||||
return Reflect.set(t, p, rewriteCss(v, client.meta));
|
||||
},
|
||||
});
|
||||
},
|
||||
|
|
|
@ -11,7 +11,7 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
get(ctx) {
|
||||
const name = ctx.get() as string;
|
||||
|
||||
return name.substring(name.indexOf("@") + 1);
|
||||
return name.substring(name.indexOf("@") + 1);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
@ -86,14 +86,14 @@ export default function (client: ScramjetClient, self: Self) {
|
|||
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", {
|
||||
|
@ -107,7 +107,7 @@ return parser.parseFromString(body, "text/xml");
|
|||
const re = new RegExp(`^${header}: (.*)$`, "m");
|
||||
const match = re.exec(headers);
|
||||
|
||||
return match ? match[1] : null;
|
||||
return match ? match[1] : null;
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
|
@ -67,7 +67,7 @@ export default function (client: ScramjetClient, self: typeof globalThis) {
|
|||
debugger;
|
||||
}
|
||||
|
||||
return v;
|
||||
return v;
|
||||
};
|
||||
|
||||
// location = "..." can't be rewritten as wrapfn(location) = ..., so instead it will actually be rewritten as
|
||||
|
|
|
@ -273,7 +273,7 @@ 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) {
|
||||
|
@ -281,5 +281,5 @@ function bytesToBase64(bytes: Uint8Array) {
|
|||
String.fromCodePoint(byte)
|
||||
).join("");
|
||||
|
||||
return btoa(binString);
|
||||
return btoa(binString);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue