-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
25 lines (25 loc) · 981 Bytes
/
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="default.css">
<link rel="stylesheet" type="text/css" href="style.css">
<title>ProofCheck</title>
</head>
<body>
<div id="elm-app"></div>
<script src="build/main.js"></script>
<script>
var storedState = localStorage.getItem('proof');
var startingState = storedState ? JSON.parse(storedState) : null;
var elmDiv = document.getElementById('elm-app');
var myApp = Elm.Main.embed(elmDiv, startingState);
myApp.ports.storeProof.subscribe(function(proof) {
var proofJson = JSON.stringify(proof)
localStorage.setItem('proof', proofJson);
});
</script>
</body>
</html>