mirror of http://git.sublab.org/mjpegplexer/
Add main.js to repository
This commit is contained in:
parent
573a798156
commit
5a3aa3fcd3
|
@ -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);
|
Loading…
Reference in New Issue