Skip to content

Instantly share code, notes, and snippets.

@dmorrison42
Created March 16, 2019 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmorrison42/93f20ab1d74fb6440c108a041cd65491 to your computer and use it in GitHub Desktop.
Save dmorrison42/93f20ab1d74fb6440c108a041cd65491 to your computer and use it in GitHub Desktop.
<script>
!(function () {
const url = 'http://192.168.1.41:8060';
function keypress(button) {
const httpRequest = new XMLHttpRequest();
httpRequest.open('POST', url + '/keypress/' + button, true);
httpRequest.send();
}
window.keypress = keypress;
}());
</script>
<body>
<a onclick="keypress('home')" href="#">Home</a>
<a onclick="keypress('up')" href="#">Up</a>
<a onclick="keypress('down')" href="#">Down</a>
<a onclick="keypress('left')" href="#">Left</a>
<a onclick="keypress('right')" href="#">Right</a>
<a onclick="keypress('select')" href="#">Select</a>
<a onclick="keypress('volumeup')" href="#">+</a>
<a onclick="keypress('volumedown')" href="#">-</a>
<a onclick="keypress('mute')" href="#">Mute</a>
<a onclick="keypress('play')" href="#">play</a>
<a onclick="keypress('instantreplay')" href="#">Replay</a>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment