mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
display: improve java script
Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
78a0cc300f
commit
93a34b7755
@ -5,13 +5,14 @@
|
||||
<script type="text/javascript" src="static/socket.io.slim.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port)
|
||||
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port);
|
||||
|
||||
socket.on('connect', function() {
|
||||
socket.emit('connected');
|
||||
});
|
||||
socket.on('status', function(status) {
|
||||
$('#led').attr('src', status.led)
|
||||
$('#message').html(status.message)
|
||||
$('#led').attr('src', status.led);
|
||||
$('#message').html(status.message);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user