-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·36 lines (29 loc) · 852 Bytes
/
index.html
File metadata and controls
executable file
·36 lines (29 loc) · 852 Bytes
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
<html>
<head>
<title>Bitcoin Live Price App</title>
<script>
var ipcRenderer = require('electron').ipcRenderer;
ipcRenderer.on('currencies', function (event, array) {
array[0].forEach(function (element, key) {
var x = document.getElementById("fiatCurrency");
var option = document.createElement("option");
option.text = element.code;
if (element.code == array[1]) {
option.selected = true;
}
x.add(option);
});
});
ipcRenderer.on('supported', function (event, supported) {
console.log(Object.keys(supported).length)
});
function updateSelectedFiatCurrency() {
ipcRenderer.send('changedFiatCurrency', document.getElementById("fiatCurrency").value)
}
</script>
</head>
<body>
<select id="fiatCurrency" onchange="updateSelectedFiatCurrency()">
</select>
</body>
</html>