Skip to content

Commit 80c5c8b

Browse files
committed
format
1 parent 87b8890 commit 80c5c8b

File tree

5 files changed

+30
-28
lines changed

5 files changed

+30
-28
lines changed

static/assets/css/settings.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ select {
231231

232232
#warning {
233233
color: red;
234-
}
234+
}

static/assets/js/001.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ try {
55
qp = window.top.location.pathname === "/d";
66
} catch {
77
try {
8-
qp = window.parent.location.pathname === "/d";
8+
qp = window.parent.location.pathname === "/d";
99
} catch {
1010
qp = false;
1111
}
1212
}
1313

1414
document.addEventListener("DOMContentLoaded", () => {
1515
// Blocked Hostnames Check
16-
const blockedHostnames = [
16+
const blockedHostnames = [
1717
"gointerstellar.app",
1818
"computers-science.com",
1919
"roundrockisd.online",
@@ -24,9 +24,10 @@ document.addEventListener("DOMContentLoaded", () => {
2424
if (!blockedHostnames.includes(window.location.hostname)) {
2525
const script = document.createElement("script");
2626
script.type = "text/javascript";
27-
script.src = "//angelabedsautopsy.com/1c/c3/8a/1cc38a6899fdf8ba4dfe779bcc54627b.js";
27+
script.src =
28+
"//angelabedsautopsy.com/1c/c3/8a/1cc38a6899fdf8ba4dfe779bcc54627b.js";
2829
document.body.appendChild(script);
29-
}
30+
}
3031

3132
const nav = document.querySelector(".f-nav");
3233

static/assets/js/002.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ try {
1010
t = window.top.location.pathname === "/d";
1111
} catch {
1212
try {
13-
t = window.parent.location.pathname === "/d";
13+
t = window.parent.location.pathname === "/d";
1414
} catch {
1515
t = false;
1616
}

static/assets/js/005.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ try {
1111
xl = window.top.location.pathname === "/d";
1212
} catch {
1313
try {
14-
xl = window.parent.location.pathname === "/d";
14+
xl = window.parent.location.pathname === "/d";
1515
} catch {
1616
xl = false;
1717
}

static/assets/js/006.js

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ function redirectToMainDomain() {
166166
const target = mainDomainUrl + window.location.pathname;
167167
if (window !== top) {
168168
try {
169-
top.location.href = target
169+
top.location.href = target;
170170
} catch {
171171
try {
172-
parent.location.href = target
172+
parent.location.href = target;
173173
} catch {
174-
window.location.href = target
174+
window.location.href = target;
175175
}
176176
}
177177
} else window.location.href = mainDomainUrl + window.location.pathname;
@@ -375,17 +375,17 @@ function randRange(min, max) {
375375

376376
function exportSaveData() {
377377
function getCookies() {
378-
let cookies = document.cookie.split('; ');
379-
let cookieObj = {};
378+
const cookies = document.cookie.split("; ");
379+
const cookieObj = {};
380380
cookies.forEach(cookie => {
381-
let [name, value] = cookie.split('=');
381+
const [name, value] = cookie.split("=");
382382
cookieObj[name] = value;
383383
});
384384
return cookieObj;
385385
}
386386
function getLocalStorage() {
387-
let localStorageObj = {};
388-
for (let key in localStorage) {
387+
const localStorageObj = {};
388+
for (const key in localStorage) {
389389
if (localStorage.hasOwnProperty(key)) {
390390
localStorageObj[key] = localStorage.getItem(key);
391391
}
@@ -394,29 +394,29 @@ function exportSaveData() {
394394
}
395395
const data = {
396396
cookies: getCookies(),
397-
localStorage: getLocalStorage()
397+
localStorage: getLocalStorage(),
398398
};
399399
const dataStr = JSON.stringify(data, null, 2);
400-
const blob = new Blob([dataStr], { type: 'application/json' });
400+
const blob = new Blob([dataStr], { type: "application/json" });
401401
const url = URL.createObjectURL(blob);
402-
const a = document.createElement('a');
402+
const a = document.createElement("a");
403403
a.href = url;
404-
a.download = 'save_data.json';
404+
a.download = "save_data.json";
405405
document.body.appendChild(a);
406406
a.click();
407407
document.body.removeChild(a);
408408
URL.revokeObjectURL(url);
409409
}
410410

411411
function importSaveData() {
412-
const input = document.createElement('input');
413-
input.type = 'file';
414-
input.accept = 'application/json';
415-
input.onchange = function(event) {
412+
const input = document.createElement("input");
413+
input.type = "file";
414+
input.accept = "application/json";
415+
input.onchange = event => {
416416
const file = event.target.files[0];
417417
if (!file) return;
418418
const reader = new FileReader();
419-
reader.onload = function(e) {
419+
reader.onload = e => {
420420
try {
421421
const data = JSON.parse(e.target.result);
422422
if (data.cookies) {
@@ -429,14 +429,15 @@ function importSaveData() {
429429
localStorage.setItem(key, value);
430430
});
431431
}
432-
alert('Your save data has been imported. Please test it out.')
433-
alert('If you find any issues then report it in GitHub or the Interstellar Discord.')
432+
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+
);
434436
} catch (error) {
435-
console.error('Error parsing JSON file:', error);
437+
console.error("Error parsing JSON file:", error);
436438
}
437439
};
438440
reader.readAsText(file);
439441
};
440442
input.click();
441443
}
442-

0 commit comments

Comments
 (0)