-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathchlorine_info.html
71 lines (60 loc) · 1.13 KB
/
chlorine_info.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
<html>
<head><title></title>
<style>
html {
overflow-y: scroll;
}
body {
margin: 0.5em;
background-color: black;
color: white;
cursor: default;
}
li {
margin: 0;
}
ul {
margin: 0;
}
</style>
</head>
<body>
<div id="content">No game loaded.</div>
<script>
"use strict";
const alert = require("./modules/alert");
const ipcRenderer = require("electron").ipcRenderer;
ipcRenderer.on("update", (event, msg) => {
let content = document.getElementById("content");
content.innerHTML = msg;
});
// Setup drag-and-drop...
window.ondragover = () => false;
window.ondragleave = () => false;
window.ondragend = () => false;
window.ondrop = (event) => {
event.preventDefault();
ipcRenderer.send("relay", {
receiver: "renderer",
channel: "open",
content: event.dataTransfer.files[0].path,
});
return false;
};
let select_ship = (id) => {
ipcRenderer.send("relay", {
receiver: "renderer",
channel: "select_ship",
content: id,
});
}
let select_planet = (id) => {
ipcRenderer.send("relay", {
receiver: "renderer",
channel: "select_planet",
content: id,
});
}
</script>
</body>
</html>