-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontrol.html
More file actions
29 lines (24 loc) · 860 Bytes
/
control.html
File metadata and controls
29 lines (24 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<button id='on' class='btn btn-default'>Toggle On</button>
<button id='off' class='btn btn-default'>Toggle Off</button>
<!-- Provides the interface to info-beamer hosted -->
<script src="hosted.js"></script>
<script>
// Add CSS style, so the interface has the same look & feel like
// the rest of the info-beamer hosted interface. It's bootstrap 3.
ib.setDefaultStyle();
document.getElementById('on').addEventListener('click', function(evt) {
// Send a command. This ends up in the running lua code on the device
ib.sendCommand("toggle", "on");
});
document.getElementById('off').addEventListener('click', function(evt) {
ib.sendCommand("toggle", "off");
});
</script>
</body>
</html>