input.js socket souble declaration fix

master
louisa 1 year ago
parent 864f74e15f
commit 3a7e360826

@ -2,13 +2,13 @@ var socket = io();
socket.on('data', function(data){ socket.on('data', function(data){
console.log(data); console.log(data);
document.getElementById('sample').style.opacity = data+"%"; document.getElementById('sample').style.opacity = data + "%";
}); });
socket.on('node5', function(sensor){ socket.on('node5', function(sensor){
console.log(sensor); console.log(sensor);
document.getElementById("file").value = sensor; document.getElementById("file").value = sensor;
if(distance5>0.02 && sensor==50){ if(distance5 > 0.02 && sensor == 50){
alert('u won.'); alert('u won.');
} }
}); });

Loading…
Cancel
Save