summaryrefslogtreecommitdiff
path: root/cam_public/main.js
blob: 134f194b9968024b5ef85428e85af3e57611febb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);