-
Notifications
You must be signed in to change notification settings - Fork 28
/
about.html
224 lines (190 loc) · 4.7 KB
/
about.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!DOCTYPE html>
<html>
<head>
<title>About Lectrote</title>
<link rel="stylesheet" href="./fonts.css" type="text/css">
<style type="text/css">
body {
background: #EEE;
color: black;
font-family: "Lora", Georgia, serif;
margin: 20px;
font-size: 0.85em;
}
body.DarkMode {
background: #222;
color: white;
}
#content {
max-width: 550px;
margin: auto;
text-align: center;
}
h1 {
font-size: 1.33em;
}
h3 {
font-size: 1.0em;
margin: 0.2em;
}
.Go {
font-size: 1.33em;
padding: 1em;
background: white;
}
.DarkMode .Go {
background: black;
}
.Hidden {
display: none;
}
.DarkMode a {
color: #AAF;
}
</style>
<script type="text/javascript">
function update(id, text)
{
var el = document.getElementById(id);
if (el) {
remove_children(el);
el.appendChild(document.createTextNode(text));
}
}
function remove_children(parent)
{
var obj, ls;
ls = parent.childNodes;
while (ls.length > 0) {
obj = ls.item(0);
parent.removeChild(obj);
}
}
function unhide(id)
{
var el = document.getElementById(id);
if (el) {
if (el.className == 'Hidden')
el.className = null;
}
}
function evhan_darklight(darklight)
{
var el = document.getElementById('body');
if (!darklight) {
el.className = 'LightMode';
}
else {
el.className = 'DarkMode';
}
}
function onready()
{
if (!window.require)
return;
var fs = require('fs');
var path_mod = require('path');
require('electron').ipcRenderer.on('recent-count', function(ev, arg) {
if (arg)
unhide('open_recent');
});
require('electron').ipcRenderer.on('set-darklight-mode', function(ev, arg) {
evhan_darklight(arg);
});
if (window.process) {
update('electron_version', process.versions.electron);
update('chrome_version', process.versions.chrome);
update('node_version', process.versions.node);
}
if (window.__dirname) {
try {
var path = path_mod.join(__dirname, 'package.json');
var val = fs.readFileSync(path, { encoding:'utf8' });
var package = JSON.parse(val);
update('lectrote_version', package.lectroteVersion);
if (package.lectrotePackagedGame) {
var el = document.getElementById('go');
if (el)
el.remove();
}
}
catch (ex) { }
try {
var path = path_mod.join(__dirname, 'ifvms', 'package.json');
var val = fs.readFileSync(path, { encoding:'utf8' });
var package = JSON.parse(val);
update('ifvms_version', package.version);
}
catch (ex) { }
try {
var path = path_mod.join(__dirname, 'emglken', 'versions.json');
var val = fs.readFileSync(path, { encoding:'utf8' });
var package = JSON.parse(val);
update('emglken_version', package.emglken);
update('hugo_version', package.hugo);
update('git_version', package.git);
update('glulxe_version', package.glulxe);
update('tads_version', package.tads);
}
catch (ex) { }
try {
var path = path_mod.join(__dirname, 'inkjs', 'package.json');
var val = fs.readFileSync(path, { encoding:'utf8' });
var package = JSON.parse(val);
update('inkjs_version', package.version);
}
catch (ex) { }
}
window.Quixe = require('./quixe/lib/quixe.min.js').Quixe;
if (window.Quixe) {
update('quixe_version', Quixe.version);
}
}
function opengame()
{
var ipcRenderer = require('electron').ipcRenderer;
ipcRenderer.send('select_load_game');
}
function openrecent()
{
var ipcRenderer = require('electron').ipcRenderer;
ipcRenderer.send('select_load_recent');
}
</script>
</head>
<body id="body">
<div id="content">
<p>
<img src="icon-128.png" alt="Lectrote icon">
</p>
<h1>Lectrote <a id="lectrote_version" href="https://github.com/erkyrath/lectrote">???</a></h1>
<h3>A portable IF interpreter app</h3>
<h3>Constructed by Andrew Plotkin</h3>
<p>
Quixe <span id="quixe_version">???</span>;
inkjs <span id="inkjs_version">???</span>;
ZVM (ifvms) <span id="ifvms_version">???</span>;
<br>
emglken <span id="emglken_version">???</span>
(Git <span id="git_version">???</span>;
Glulxe <span id="glulxe_version">???</span>;
Hugo <span id="hugo_version">???</span>;
TADS <span id="tads_version">???</span>)
<br>
Electron <span id="electron_version">???</span>
(Node <span id="node_version">???</span>,
Chrome <span id="chrome_version">???</span>)
—
<a href="https://github.com/erkyrath/lectrote/blob/master/LICENSE">license info</a>
</p>
<p id='go' class="Go">
Select <a href="javascript:opengame()">Open Game</a>
to begin playing a Glulx, Z-code, Hugo, TADS, or Ink game file!
<span id="open_recent" class="Hidden">Or select a <a href="javascript:openrecent()">recently played game</a>.</span>
</p>
</div>
</body>
<script type="text/javascript">
onready();
</script>
</html>