Skip to content

Commit 730ecbf

Browse files
committed
Migrated biome + formatted
1 parent cf92e2f commit 730ecbf

File tree

10 files changed

+43
-135
lines changed

10 files changed

+43
-135
lines changed

biome.json

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,23 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
33
"files": {
4-
"ignore": [
5-
"static/assets/history/**",
6-
"static/assets/mathematics/**",
7-
"static/assets/json/*.min.json",
8-
"Masqr.js",
9-
"node_modules/**",
10-
"package-lock.json",
11-
"package.json",
12-
"*.md",
13-
"bun.lockb",
14-
"Failed.html"
15-
]
16-
},
17-
"organizeImports": {
18-
"enabled": true,
19-
"ignore": ["**/pnpm-lock.yaml", "**/dist/**", "**/node_modules/**", "**/assets/bundled/**", "*.min.json", "**/.astro/**"]
4+
"includes": ["**", "!**/static/assets/history/**", "!**/static/assets/mathematics/**", "!**/static/assets/json/**/*.min.json", "!**/Masqr.js", "!**/node_modules/**", "!**/package-lock.json", "!**/package.json", "!**/*.md", "!**/bun.lockb", "!**/Failed.html"]
205
},
6+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
217
"linter": {
228
"enabled": true,
239
"rules": {
2410
"recommended": true
2511
},
26-
"ignore": ["**/pnpm-lock.yaml", "**/dist/**", "**/node_modules/**", "**/assets/bundled/**", "*.min.json", "**/.astro/**"]
12+
"includes": ["**", "!**/pnpm-lock.yaml", "!**/dist/**", "!**/node_modules/**", "!**/assets/bundled/**", "!**/*.min.json", "!**/.astro/**"]
2713
},
2814
"formatter": {
2915
"indentStyle": "space",
3016
"indentWidth": 2,
3117
"lineEnding": "lf",
3218
"lineWidth": 320,
3319
"attributePosition": "auto",
34-
"ignore": ["**/pnpm-lock.yaml", "**/dist/**", "**/node_modules/**", "**/assets/bundled/**", "*.min.json", "**/.astro/**"]
20+
"includes": ["**", "!**/pnpm-lock.yaml", "!**/dist/**", "!**/node_modules/**", "!**/assets/bundled/**", "!**/*.min.json", "!**/.astro/**"]
3521
},
3622
"javascript": {
3723
"formatter": {

index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ const cache = new Map();
2323
const CACHE_TTL = 30 * 24 * 60 * 60 * 1000; // Cache for 30 Days
2424

2525
if (config.challenge !== false) {
26-
console.log(
27-
chalk.green("🔒 Password protection is enabled! Listing logins below"),
28-
);
26+
console.log(chalk.green("🔒 Password protection is enabled! Listing logins below"));
2927
// biome-ignore lint/complexity/noForEach:
3028
Object.entries(config.users).forEach(([username, password]) => {
3129
console.log(chalk.blue(`Username: ${username}, Password: ${password}`));
@@ -71,9 +69,7 @@ app.get("/e/*", async (req, res, next) => {
7169
const data = Buffer.from(await asset.arrayBuffer());
7270
const ext = path.extname(reqTarget);
7371
const no = [".unityweb"];
74-
const contentType = no.includes(ext)
75-
? "application/octet-stream"
76-
: mime.getType(ext);
72+
const contentType = no.includes(ext) ? "application/octet-stream" : mime.getType(ext);
7773

7874
cache.set(req.path, { data, contentType, timestamp: Date.now() });
7975
res.writeHead(200, { "Content-Type": contentType });

static/assets/css/nav.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
.material-symbols-outlined {
2-
font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
2+
font-variation-settings:
3+
"FILL" 0,
4+
"wght" 400,
5+
"GRAD" 0,
6+
"opsz" 48;
37
}
48

59
.f-nav #icon-container {

static/assets/js/c1.js

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,11 @@ function handleClick(app) {
7171
}
7272

7373
function getSelected(links) {
74-
const options = links
75-
.map((link, index) => `${index + 1}: ${link.name}`)
76-
.join("\n");
77-
const choice = prompt(
78-
`Select a link by entering the corresponding number:\n${options}`,
79-
);
74+
const options = links.map((link, index) => `${index + 1}: ${link.name}`).join("\n");
75+
const choice = prompt(`Select a link by entering the corresponding number:\n${options}`);
8076
const selectedIndex = Number.parseInt(choice, 10) - 1;
8177

82-
if (
83-
Number.isNaN(selectedIndex) ||
84-
selectedIndex < 0 ||
85-
selectedIndex >= links.length
86-
) {
78+
if (Number.isNaN(selectedIndex) || selectedIndex < 0 || selectedIndex >= links.length) {
8779
alert("Invalid selection. Please try again.");
8880
return null;
8981
}
@@ -283,10 +275,7 @@ fetch(path)
283275
for (const app of appsList) {
284276
if (app.categories?.includes("local")) {
285277
app.local = true;
286-
} else if (
287-
app.link &&
288-
(app.link.includes("now.gg") || app.link.includes("nowgg.me"))
289-
) {
278+
} else if (app.link && (app.link.includes("now.gg") || app.link.includes("nowgg.me"))) {
290279
if (app.partial === null || app.partial === undefined) {
291280
app.partial = true;
292281
app.say = "Now.gg is currently not working for some users.";
@@ -358,8 +347,7 @@ fetch(path)
358347
} else if (app.partial) {
359348
paragraph.style.color = "yellow";
360349
if (!app.say) {
361-
app.say =
362-
"This app is currently experiencing some issues, it may not work for you. (Dynamic doesn't work in about:blank)";
350+
app.say = "This app is currently experiencing some issues, it may not work for you. (Dynamic doesn't work in about:blank)";
363351
}
364352
}
365353

@@ -392,18 +380,13 @@ fetch(path)
392380
});
393381

394382
function category() {
395-
const selectedCategories = Array.from(
396-
document.querySelectorAll("#category option:checked"),
397-
).map(option => option.value);
383+
const selectedCategories = Array.from(document.querySelectorAll("#category option:checked")).map(option => option.value);
398384
const g = document.getElementsByClassName("column");
399385

400386
for (const game of g) {
401387
const categories = game.getAttribute("data-category").split(" ");
402388

403-
if (
404-
selectedCategories.length === 0 ||
405-
selectedCategories.some(category => categories.includes(category))
406-
) {
389+
if (selectedCategories.length === 0 || selectedCategories.some(category => categories.includes(category))) {
407390
game.style.display = "block";
408391
} else {
409392
game.style.display = "none";

static/assets/js/h1.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,19 @@ try {
77
inFrame = true;
88
}
99
if (!localStorage.getItem("ab")) localStorage.setItem("ab", true);
10-
if (
11-
!inFrame &&
12-
!navigator.userAgent.includes("Firefox") &&
13-
localStorage.getItem("ab") === "true"
14-
) {
10+
if (!inFrame && !navigator.userAgent.includes("Firefox") && localStorage.getItem("ab") === "true") {
1511
const popup = open("about:blank", "_blank");
1612
setTimeout(() => {
1713
if (!popup || popup.closed) {
18-
alert(
19-
"Please allow popups for this site. Doing so will allow us to open the site in a about:blank tab and preventing this site from showing up in your history. You can turn this off in the site settings.",
20-
);
14+
alert("Please allow popups for this site. Doing so will allow us to open the site in a about:blank tab and preventing this site from showing up in your history. You can turn this off in the site settings.");
2115
} else {
2216
const doc = popup.document;
2317
const iframe = doc.createElement("iframe");
2418
const style = iframe.style;
2519
const link = doc.createElement("link");
2620

2721
const name = localStorage.getItem("name") || "My Drive - Google Drive";
28-
const icon =
29-
localStorage.getItem("icon") ||
30-
"https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";
22+
const icon = localStorage.getItem("icon") || "https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";
3123

3224
doc.title = name;
3325
link.rel = "icon";

static/assets/js/i1.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ function dy(value) {
6767
}
6868

6969
function isUrl(val = "") {
70-
if (
71-
/^http(s?):\/\//.test(val) ||
72-
(val.includes(".") && val.substr(0, 1) !== " ")
73-
) {
70+
if (/^http(s?):\/\//.test(val) || (val.includes(".") && val.substr(0, 1) !== " ")) {
7471
return true;
7572
}
7673
return false;

static/assets/js/m1.js

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,12 @@ try {
1313

1414
document.addEventListener("DOMContentLoaded", () => {
1515
// Blocked Hostnames Check
16-
const blockedHostnames = [
17-
"gointerstellar.app",
18-
"computers-science.com",
19-
"roundrockisd.online",
20-
"algebraxyz.info",
21-
"thegalleryofart.info",
22-
];
16+
const blockedHostnames = ["gointerstellar.app", "computers-science.com", "roundrockisd.online", "algebraxyz.info", "thegalleryofart.info"];
2317

2418
if (!blockedHostnames.includes(window.location.hostname)) {
2519
const script = document.createElement("script");
2620
script.type = "text/javascript";
27-
script.src =
28-
"//angelabedsautopsy.com/1c/c3/8a/1cc38a6899fdf8ba4dfe779bcc54627b.js";
21+
script.src = "//angelabedsautopsy.com/1c/c3/8a/1cc38a6899fdf8ba4dfe779bcc54627b.js";
2922
document.body.appendChild(script);
3023
}
3124

@@ -51,10 +44,7 @@ document.addEventListener("DOMContentLoaded", () => {
5144
}
5245

5346
// LocalStorage Setup for 'dy'
54-
if (
55-
localStorage.getItem("dy") === null ||
56-
localStorage.getItem("dy") === undefined
57-
) {
47+
if (localStorage.getItem("dy") === null || localStorage.getItem("dy") === undefined) {
5848
localStorage.setItem("dy", "false");
5949
}
6050

static/assets/js/s1.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ document.addEventListener("DOMContentLoaded", () => {
6666
const storedP = localStorage.getItem("uv");
6767
if (storedP === "true") {
6868
pChangeElement.value = "uv";
69-
} else if (
70-
localStorage.getItem("dy") === "true" ||
71-
localStorage.getItem("dy") === "auto"
72-
) {
69+
} else if (localStorage.getItem("dy") === "true" || localStorage.getItem("dy") === "auto") {
7370
pChangeElement.value = "dy";
7471
} else {
7572
pChangeElement.value = "uv";
@@ -114,9 +111,7 @@ function saveEventKey() {
114111
const dropdown = document.getElementById("dropdown");
115112
const options = dropdown.getElementsByTagName("option");
116113

117-
const sortedOptions = Array.from(options).sort((a, b) =>
118-
a.textContent.localeCompare(b.textContent),
119-
);
114+
const sortedOptions = Array.from(options).sort((a, b) => a.textContent.localeCompare(b.textContent));
120115

121116
while (dropdown.firstChild) {
122117
dropdown.removeChild(dropdown.firstChild);
@@ -270,9 +265,7 @@ function AB() {
270265
const link = doc.createElement("link");
271266

272267
const name = localStorage.getItem("name") || "My Drive - Google Drive";
273-
const icon =
274-
localStorage.getItem("icon") ||
275-
"https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";
268+
const icon = localStorage.getItem("icon") || "https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";
276269

277270
doc.title = name;
278271
link.rel = "icon";
@@ -430,9 +423,7 @@ function importSaveData() {
430423
});
431424
}
432425
alert("Your save data has been imported. Please test it out.");
433-
alert(
434-
"If you find any issues then report it in GitHub or the Interstellar Discord.",
435-
);
426+
alert("If you find any issues then report it in GitHub or the Interstellar Discord.");
436427
} catch (error) {
437428
console.error("Error parsing JSON file:", error);
438429
}

static/assets/js/t1.js

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,21 @@ window.addEventListener("load", () => {
77
form.addEventListener("submit", async event => {
88
event.preventDefault();
99
const formValue = input.value.trim();
10-
const url = isUrl(formValue)
11-
? prependHttps(formValue)
12-
: `https://www.google.com/search?q=${formValue}`;
10+
const url = isUrl(formValue) ? prependHttps(formValue) : `https://www.google.com/search?q=${formValue}`;
1311
processUrl(url);
1412
});
1513
}
1614
function processUrl(url) {
1715
sessionStorage.setItem("GoUrl", __uv$config.encodeUrl(url));
1816
const iframeContainer = document.getElementById("frame-container");
19-
const activeIframe = Array.from(iframeContainer.querySelectorAll("iframe")).find(
20-
iframe => iframe.classList.contains("active"),
21-
);
17+
const activeIframe = Array.from(iframeContainer.querySelectorAll("iframe")).find(iframe => iframe.classList.contains("active"));
2218
activeIframe.src = `/a/${__uv$config.encodeUrl(url)}`;
2319
activeIframe.dataset.tabUrl = url;
2420
input.value = url;
2521
console.log(activeIframe.dataset.tabUrl);
2622
}
2723
function isUrl(val = "") {
28-
if (
29-
/^http(s?):\/\//.test(val) ||
30-
(val.includes(".") && val.substr(0, 1) !== " ")
31-
) {
24+
if (/^http(s?):\/\//.test(val) || (val.includes(".") && val.substr(0, 1) !== " ")) {
3225
return true;
3326
}
3427
return false;
@@ -53,8 +46,7 @@ document.addEventListener("DOMContentLoaded", event => {
5346
const newTab = document.createElement("li");
5447
const tabTitle = document.createElement("span");
5548
const newIframe = document.createElement("iframe");
56-
newIframe.sandbox =
57-
"allow-same-origin allow-scripts allow-forms allow-pointer-lock allow-modals allow-orientation-lock allow-presentation allow-storage-access-by-user-activation";
49+
newIframe.sandbox = "allow-same-origin allow-scripts allow-forms allow-pointer-lock allow-modals allow-orientation-lock allow-presentation allow-storage-access-by-user-activation";
5850
// When Top Navigation is not allowed links with the "top" value will be entirely blocked, if we allow Top Navigation it will overwrite the tab, which is obviously not wanted.
5951
tabTitle.textContent = `New Tab ${tabCounter}`;
6052
tabTitle.className = "t";
@@ -140,14 +132,10 @@ document.addEventListener("DOMContentLoaded", event => {
140132
tabCounter = 0;
141133
document.getElementById("iv").value = "";
142134
} else {
143-
const nextTabIndex = remainingTabs.findIndex(
144-
tab => tab.dataset.tabId !== tabId,
145-
);
135+
const nextTabIndex = remainingTabs.findIndex(tab => tab.dataset.tabId !== tabId);
146136
if (nextTabIndex > -1) {
147137
const nextTabToActivate = remainingTabs[nextTabIndex];
148-
const nextIframeToActivate = iframeContainer.querySelector(
149-
`[data-tab-id='${nextTabToActivate.dataset.tabId}']`,
150-
);
138+
const nextIframeToActivate = iframeContainer.querySelector(`[data-tab-id='${nextTabToActivate.dataset.tabId}']`);
151139
for (const tab of remainingTabs) {
152140
tab.classList.remove("active");
153141
}
@@ -226,9 +214,7 @@ function popout() {
226214
const newWindow = window.open("about:blank", "_blank");
227215
if (newWindow) {
228216
const name = localStorage.getItem("name") || "My Drive - Google Drive";
229-
const icon =
230-
localStorage.getItem("icon") ||
231-
"https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";
217+
const icon = localStorage.getItem("icon") || "https://ssl.gstatic.com/docs/doclist/images/drive_2022q3_32dp.png";
232218
newWindow.document.title = name;
233219
const link = newWindow.document.createElement("link");
234220
link.rel = "icon";
@@ -358,22 +344,15 @@ if (navigator.userAgent.includes("Chrome")) {
358344
}
359345
function Load() {
360346
const activeIframe = document.querySelector("#frame-container iframe.active");
361-
if (
362-
activeIframe &&
363-
activeIframe.contentWindow.document.readyState === "complete"
364-
) {
347+
if (activeIframe && activeIframe.contentWindow.document.readyState === "complete") {
365348
const website = activeIframe.contentWindow.document.location.href;
366349
if (website.includes("/a/")) {
367-
const websitePath = website
368-
.replace(window.location.origin, "")
369-
.replace("/a/", "");
350+
const websitePath = website.replace(window.location.origin, "").replace("/a/", "");
370351
localStorage.setItem("decoded", websitePath);
371352
const decodedValue = decodeXor(websitePath);
372353
document.getElementById("iv").value = decodedValue;
373354
} else if (website.includes("/a/q/")) {
374-
const websitePath = website
375-
.replace(window.location.origin, "")
376-
.replace("/a/q/", "");
355+
const websitePath = website.replace(window.location.origin, "").replace("/a/q/", "");
377356
const decodedValue = decodeXor(websitePath);
378357
localStorage.setItem("decoded", websitePath);
379358
document.getElementById("iv").value = decodedValue;
@@ -392,9 +371,7 @@ function decodeXor(input) {
392371
return (
393372
decodeURIComponent(str)
394373
.split("")
395-
.map((char, ind) =>
396-
ind % 2 ? String.fromCharCode(char.charCodeAt(Number.NaN) ^ 2) : char,
397-
)
374+
.map((char, ind) => (ind % 2 ? String.fromCharCode(char.charCodeAt(Number.NaN) ^ 2) : char))
398375
.join("") + (search.length ? `?${search.join("?")}` : "")
399376
);
400377
}

static/assets/json/a.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,7 @@
8787
},
8888
{
8989
"name": "Discord",
90-
"links": [
91-
{ "name": "Discord", "url": "https://discord.com" },
92-
{ "name": "Discord Canary", "url": "https://canary.discord.com" },
93-
{ "name": "Discord PTB", "url": "https://ptb.discord.com" }
94-
],
90+
"links": [{ "name": "Discord", "url": "https://discord.com" }, { "name": "Discord Canary", "url": "https://canary.discord.com" }, { "name": "Discord PTB", "url": "https://ptb.discord.com" }],
9591
"image": "/assets/media/icons/dc.jpg",
9692
"categories": ["all", "social"]
9793
},
@@ -321,11 +317,7 @@
321317
},
322318
{
323319
"name": "Discord - Login",
324-
"links": [
325-
{ "name": "Discord", "url": "https://discord.com/login" },
326-
{ "name": "Discord Canary", "url": "https://canary.discord.com/login" },
327-
{ "name": "Discord PTB", "url": "https://ptb.discord.com/login" }
328-
],
320+
"links": [{ "name": "Discord", "url": "https://discord.com/login" }, { "name": "Discord Canary", "url": "https://canary.discord.com/login" }, { "name": "Discord PTB", "url": "https://ptb.discord.com/login" }],
329321
"image": "/assets/media/icons/dc.jpg",
330322
"categories": ["all", "social"],
331323
"blank": "true"

0 commit comments

Comments
 (0)