-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (64 loc) · 1.96 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CryptoAlert</title>
<script src="script.js">
</script>
<style>
#logs {
-moz-appearance: textfield-multiline;
-webkit-appearance: textarea;
resize: none;
border: 1px solid gray;
font: medium -moz-fixed;
font: -webkit-small-control;
height: 200px;
overflow: auto;
padding: 2px;
width: 700px;
}
</style>
</head>
<body>
<select name="pair" id="pair" onchange="fillPriceBox()">
<option value="">Select any</option>
</select>
<br>
<br>
<select name="condition" id="condition">
<option value="gt">Greater than</option>
<option value="lt">Less than</option>
</select>
<br>
<br>
<input type="number" name="price" id="price">
<br>
<br>
<input type="button" value="Add alert" onclick="addAlert()">
<input type="button" value="Remove all alerts" onclick="removeAlert()">
<br>
<br>
<ul id="alertList">
</ul>
<br>
<br>
<br>
<br>
<div id="logs"></div>
</body>
<script>
if (localStorage.Alerts) {
var localAlertJson = JSON.parse(localStorage.Alerts);
for (key in localAlertJson) {
var alertList = document.getElementById("alertList");
var el = document.createElement("li");
el.textContent = localAlertJson[key].symbol;
alertList.appendChild(el);
priceAlert(localAlertJson[key]);
}
}
</script>
</html>