initial commit with all the stuff
This commit is contained in:
48
fsi_touch_10052021/www/debug_div.html
Normal file
48
fsi_touch_10052021/www/debug_div.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<style type="text/css" media="screen">
|
||||
.container { width: 100%; height: 600px; overflow: scroll; }
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<h2 id="header"></h2>
|
||||
<button onclick="quitBox('quit')">Close</button>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div class="container">
|
||||
<pre id="log"></pre>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function quitBox(cmd) {
|
||||
if (cmd=='quit') {
|
||||
//open(location, '_self').close();
|
||||
//ws.send("\x03");
|
||||
self.close();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById('header').textContent = "Host: " + window.location.hostname;
|
||||
|
||||
// setup websocket with callbacks
|
||||
var ws = new WebSocket('ws://' + window.location.hostname + ':88/');
|
||||
|
||||
ws.onopen = function() {
|
||||
|
||||
};
|
||||
|
||||
ws.onclose = function() {
|
||||
// close();
|
||||
};
|
||||
|
||||
ws.onmessage = function(event) {
|
||||
document.getElementById('log').textContent += "event.data" + "\n";
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user