@@ -9,28 +9,6 @@ localStorage.setItem("translucenceThemeId", createAppStartupCodeFile(() => {
9
9
document . getElementById ( "pageEmbed" ) . style . opacity = "0.85" ;
10
10
document . getElementById ( "pageEmbed" ) . style . borderTopLeftRadius = "0" ;
11
11
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
- } ;
34
12
if ( ( JSON . parse ( localStorage . getItem ( "settings" ) ) || { } ) . darkMode ) {
35
13
localStorage . setItem ( "settings" , JSON . stringify ( {
36
14
...JSON . parse ( localStorage . getItem ( "settings" ) ) || { } ,
@@ -65,4 +43,27 @@ localStorage.setItem("translucenceThemeId", createAppStartupCodeFile(() => {
65
43
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" ;
66
44
} ;
67
45
} ) ;
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