11
0
Fork 0
mirror of http://git.sublab.org/mjpegplexer/ synced 2025-07-01 14:36:09 +02:00

Add main.js to repository

This commit is contained in:
Christian Franke 2014-01-24 01:02:58 +01:00
parent 573a798156
commit 5a3aa3fcd3

20
cam_public/main.js Normal file
View file

@ -0,0 +1,20 @@
window.setTimeout(function() {
var actions = {
left : null,
right : null,
up : null,
down : null
};
for (var action in actions) {
(function() {
var laction = action;
document.getElementById(action).onclick = function() {
var request = new XMLHttpRequest();
request.open("get", "../control/" + laction, false);
request.send();
return false;
};
}());
}
}, 1000);