mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 23:10:02 -04:00
chore: prettier
This commit is contained in:
parent
2a943adf91
commit
fa7f986662
3 changed files with 8 additions and 14 deletions
|
@ -14,7 +14,7 @@
|
|||
"dev": "node server.js",
|
||||
"prepublish": "pnpm build",
|
||||
"pub": "pnpm publish --no-git-checks --access public",
|
||||
"format": "prettier --config prettier.json --write .",
|
||||
"format": "prettier --config .prettierrc.js --write .",
|
||||
"lint": "eslint ./src/ --ext .ts",
|
||||
"lint:fix": "eslint ./src/ --ext .ts --fix"
|
||||
},
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"trailingComma": "es5",
|
||||
"useTabs": true,
|
||||
"semi": true,
|
||||
"singleQuote": false
|
||||
}
|
|
@ -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);
|
||||
|
@ -183,8 +183,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) {
|
||||
|
@ -274,7 +274,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
|||
ctx.args[0],
|
||||
client.cookieStore,
|
||||
client.meta,
|
||||
false,
|
||||
false
|
||||
);
|
||||
}
|
||||
},
|
||||
|
@ -286,7 +286,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
|||
ctx.args[0],
|
||||
client.cookieStore,
|
||||
client.meta,
|
||||
true,
|
||||
true
|
||||
);
|
||||
},
|
||||
});
|
||||
|
@ -297,7 +297,7 @@ export default function (client: ScramjetClient, self: typeof window) {
|
|||
ctx.args[0],
|
||||
client.cookieStore,
|
||||
client.meta,
|
||||
false,
|
||||
false
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue