diff options
Diffstat (limited to '')
-rw-r--r-- | picarones-elm/index.html | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/picarones-elm/index.html b/picarones-elm/index.html index 4fe72c7..156eb9c 100644 --- a/picarones-elm/index.html +++ b/picarones-elm/index.html @@ -3,32 +3,17 @@ <head> <meta charset="UTF-8"> <title>Main</title> - <script src="Main.js"></script> + <script src="Cover.js"></script> <link rel="stylesheet" type="text/css" href="document.css" /> </head> <body> <div id="elm"></div> <script> - let args = location.hash.split("#").slice(1); - - var app = Elm.Main.init({ + var app = Elm.Cover.init({ node: document.getElementById('elm'), - flags: [args[0], parseInt(args[1])] + flags: "{{ baseurl }}" }); - - let ws = new WebSocket("ws://localhost:9160") - - ws.onopen = () => ws.send ("{\"room\":\"testroom\"}"); - - ws.onmessage = function(msg) { - console.log(msg.data) - app.ports.recvPort.send(msg.data) - } - - app.ports.sendPort.subscribe(function(msg) { - ws.send(msg) - }) </script> </body> </html> |