diff --git a/package.json b/package.json index ac6d3fa..b744d2c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,10 @@ "lint": "eslint ./src/ --ext .ts", "lint:fix": "eslint ./src/ --ext .ts --fix" }, - "files": ["dist", "lib"], + "files": [ + "dist", + "lib" + ], "keywords": [], "author": "", "license": "ISC", diff --git a/src/client/client.ts b/src/client/client.ts index d83cef8..12db639 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -108,7 +108,7 @@ export class ScramjetClient { resolve(data.port); } }); - }), + }) ); } @@ -239,7 +239,7 @@ export class ScramjetClient { h.construct = function ( constructor: any, argArray: any[], - newTarget: AnyFunction, + newTarget: AnyFunction ) { let returnValue: any = undefined; let earlyreturn = false; @@ -354,7 +354,7 @@ export class ScramjetClient { RawTrap( target: any, prop: string, - descriptor: Trap, + descriptor: Trap ): PropertyDescriptor { if (!target) return; if (!prop) return; diff --git a/src/client/dom/element.ts b/src/client/dom/element.ts index d949432..9553e07 100644 --- a/src/client/dom/element.ts +++ b/src/client/dom/element.ts @@ -52,7 +52,7 @@ export default function (client: ScramjetClient, self: typeof window) { for (const element of attrObject[attr]) { const descriptor = nativeGetOwnPropertyDescriptor( element.prototype, - attr, + attr ); Object.defineProperty(element.prototype, attr, { get() { @@ -80,7 +80,7 @@ export default function (client: ScramjetClient, self: typeof window) { base: new URL(client.url.origin), origin: new URL(client.url.origin), } as URLMeta, - true, + true ); } else if (["srcset", "imagesrcset"].includes(attr)) { value = rewriteSrcset(value, client.meta); @@ -216,8 +216,8 @@ export default function (client: ScramjetClient, self: typeof window) { return atob( client.natives["Element.prototype.getAttribute"].call( ctx.this, - "data-scramjet-script-source-src", - ), + "data-scramjet-script-source-src" + ) ); } if (ctx.this instanceof self.HTMLStyleElement) { @@ -307,7 +307,7 @@ export default function (client: ScramjetClient, self: typeof window) { ctx.args[0], client.cookieStore, client.meta, - false, + false ); } }, @@ -319,7 +319,7 @@ export default function (client: ScramjetClient, self: typeof window) { ctx.args[0], client.cookieStore, client.meta, - true, + true ); }, }); @@ -330,7 +330,7 @@ export default function (client: ScramjetClient, self: typeof window) { ctx.args[0], client.cookieStore, client.meta, - false, + false ); }, }); diff --git a/src/client/shared/error.ts b/src/client/shared/error.ts index 5051760..cf716b4 100644 --- a/src/client/shared/error.ts +++ b/src/client/shared/error.ts @@ -11,7 +11,7 @@ export default function (client: ScramjetClient, self: Self) { const url = stack[i].getFileName(); try { newstack = newstack.replaceAll(url, decodeUrl(url)); - } catch { } + } catch {} } return newstack; diff --git a/src/shared/rewriters/url.ts b/src/shared/rewriters/url.ts index bcdc6e7..f5f0fb1 100644 --- a/src/shared/rewriters/url.ts +++ b/src/shared/rewriters/url.ts @@ -45,7 +45,7 @@ export function decodeUrl(url: string | URL) { if ( tryCanParseURL(url)?.pathname.startsWith( - self.$scramjet.config.prefix + "worker", + self.$scramjet.config.prefix + "worker" ) ) { return new URL(new URL(url).searchParams.get("origin")).href; @@ -55,7 +55,7 @@ export function decodeUrl(url: string | URL) { return url; } else if (tryCanParseURL(url)) { return self.$scramjet.codec.decode( - url.slice((location.origin + self.$scramjet.config.prefix).length), + url.slice((location.origin + self.$scramjet.config.prefix).length) ); } else { return url; diff --git a/static/index.html b/static/index.html index 7c55242..e4a1835 100644 --- a/static/index.html +++ b/static/index.html @@ -4,7 +4,7 @@ Scramjet - +