Skip to content

Commit 67e05b6

Browse files
Bug fix
1 parent c361f31 commit 67e05b6

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

server/apps/code/e147a27e.js

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,6 @@ localStorage.setItem("translucenceThemeId", createAppStartupCodeFile(() => {
99
document.getElementById("pageEmbed").style.opacity = "0.85";
1010
document.getElementById("pageEmbed").style.borderTopLeftRadius = "0";
1111
document.getElementById("pageEmbed").style.borderBottomLeftRadius = "0";
12-
document.getElementById("pageEmbed").contentWindow.document.body.style.color = "white";
13-
document.getElementById("pageEmbed").contentWindow.document.body.children[0].children[0].style.color = "white";
14-
if (document.getElementById("pageEmbed").src.endsWith("/scripts/index.html")) {
15-
document.getElementById("pageEmbed").contentWindow.document.body.children[2].children[0].children[1].style.color = "white";
16-
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.filter = "none";
17-
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.width = "calc(100% + 2px)";
18-
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.marginLeft = "-1px";
19-
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.marginBottom = "-1px";
20-
};
21-
if (document.getElementById("pageEmbed").src.endsWith("/debug/index.html")) {
22-
document.getElementById("pageEmbed").contentWindow.document.getElementById("debugLogInput").style.color = "white";
23-
document.getElementById("pageEmbed").contentWindow.document.getElementById("debugCodeExecutionInput").style.borderTopLeftRadius = "2.5px";
24-
document.getElementById("pageEmbed").contentWindow.document.getElementById("debugCodeExecutionInput").style.borderBottomLeftRadius = "2.5px";
25-
};
26-
if (document.getElementById("pageEmbed").src.endsWith("/settings/index.html")) {
27-
document.getElementById("pageEmbed").contentWindow.document.body.children[2].children[0].style.display = "none";
28-
document.getElementById("pageEmbed").contentWindow.document.body.children[2].children[1].style.display = "none";
29-
};
30-
if (document.getElementById("pageEmbed").src.endsWith("/help/index.html")) {
31-
document.getElementById("pageEmbed").contentWindow.document.getElementById("markdownEmbed").style.filter = "invert(95%) hue-rotate(180deg)";
32-
document.getElementById("pageEmbed").contentWindow.document.getElementById("markdownEmbed").src = ((Object.keys(JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8"))).length) ? (JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourceProtocol + "//" + JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourceHostname + ((JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourcePort) ? (":" + JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourcePort) : "")) : (process.env.DEFAULT_RESOURCE_SERVER_PROTOCOL + "//" + process.env.DEFAULT_RESOURCE_SERVER_HOSTNAME + ((process.env.DEFAULT_RESOURCE_SERVER_PORT) ? (":" + process.env.DEFAULT_RESOURCE_SERVER_PORT) : ""))) + "/help/?darkMode=true";
33-
};
3412
if ((JSON.parse(localStorage.getItem("settings")) || {}).darkMode) {
3513
localStorage.setItem("settings", JSON.stringify({
3614
...JSON.parse(localStorage.getItem("settings")) || {},
@@ -65,4 +43,27 @@ localStorage.setItem("translucenceThemeId", createAppStartupCodeFile(() => {
6543
document.getElementById("pageEmbed").contentWindow.document.getElementById("markdownEmbed").src = ((Object.keys(JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8"))).length) ? (JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourceProtocol + "//" + JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourceHostname + ((JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourcePort) ? (":" + JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourcePort) : "")) : (process.env.DEFAULT_RESOURCE_SERVER_PROTOCOL + "//" + process.env.DEFAULT_RESOURCE_SERVER_HOSTNAME + ((process.env.DEFAULT_RESOURCE_SERVER_PORT) ? (":" + process.env.DEFAULT_RESOURCE_SERVER_PORT) : ""))) + "/help/?darkMode=true";
6644
};
6745
});
68-
}));
46+
}));
47+
48+
document.getElementById("pageEmbed").contentWindow.document.body.style.color = "white";
49+
document.getElementById("pageEmbed").contentWindow.document.body.children[0].children[0].style.color = "white";
50+
if (document.getElementById("pageEmbed").src.endsWith("/scripts/index.html")) {
51+
document.getElementById("pageEmbed").contentWindow.document.body.children[2].children[0].children[1].style.color = "white";
52+
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.filter = "none";
53+
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.width = "calc(100% + 2px)";
54+
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.marginLeft = "-1px";
55+
document.getElementById("pageEmbed").contentWindow.document.getElementById("scriptEditor").style.marginBottom = "-1px";
56+
};
57+
if (document.getElementById("pageEmbed").src.endsWith("/debug/index.html")) {
58+
document.getElementById("pageEmbed").contentWindow.document.getElementById("debugLogInput").style.color = "white";
59+
document.getElementById("pageEmbed").contentWindow.document.getElementById("debugCodeExecutionInput").style.borderTopLeftRadius = "2.5px";
60+
document.getElementById("pageEmbed").contentWindow.document.getElementById("debugCodeExecutionInput").style.borderBottomLeftRadius = "2.5px";
61+
};
62+
if (document.getElementById("pageEmbed").src.endsWith("/settings/index.html")) {
63+
document.getElementById("pageEmbed").contentWindow.document.body.children[2].children[0].style.display = "none";
64+
document.getElementById("pageEmbed").contentWindow.document.body.children[2].children[1].style.display = "none";
65+
};
66+
if (document.getElementById("pageEmbed").src.endsWith("/help/index.html")) {
67+
document.getElementById("pageEmbed").contentWindow.document.getElementById("markdownEmbed").style.filter = "invert(95%) hue-rotate(180deg)";
68+
document.getElementById("pageEmbed").contentWindow.document.getElementById("markdownEmbed").src = ((Object.keys(JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8"))).length) ? (JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourceProtocol + "//" + JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourceHostname + ((JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourcePort) ? (":" + JSON.parse(fs.readFileSync(path.join(process.resourcesPath, "customServer.json"), "utf8")).resourcePort) : "")) : (process.env.DEFAULT_RESOURCE_SERVER_PROTOCOL + "//" + process.env.DEFAULT_RESOURCE_SERVER_HOSTNAME + ((process.env.DEFAULT_RESOURCE_SERVER_PORT) ? (":" + process.env.DEFAULT_RESOURCE_SERVER_PORT) : ""))) + "/help/?darkMode=true";
69+
};

0 commit comments

Comments
 (0)