stuff in index.html #18

Closed
_7m9 wants to merge 3 commits from _7m9:_7m9/dev/http into stable
Showing only changes of commit e90427d3a2 - Show all commits

View file

@ -5,6 +5,7 @@
<title>fiatlux v0.2</title> <title>fiatlux v0.2</title>
<link rel="stylesheet" href="css/picnic.min.css"> <link rel="stylesheet" href="css/picnic.min.css">
<link rel="stylesheet" href="css/style.css"> <link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head> </head>
<body> <body>
<nav> <nav>
@ -267,6 +268,11 @@
console.error(evt); console.error(evt);
setMsg("error", "WebSocket error!"); /*window.location.reload(true);*/ setMsg("error", "WebSocket error!"); /*window.location.reload(true);*/
}; };
ws.onclose = function (evt) {
msgStyle = "warning";
if(!evt.wasClean) msgStyle = "error";
setMsg(msgStyle, "WebSocket closed!")
};
ws.onmessage = function (evt) { ws.onmessage = function (evt) {
onMessage(evt); onMessage(evt);
}; };