Skip to content

Instantly share code, notes, and snippets.

@bwhite
Forked from connerbrooks/wearscript-pebble.html
Last active August 29, 2015 13:57
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 bwhite/9389289 to your computer and use it in GitHub Desktop.
Save bwhite/9389289 to your computer and use it in GitHub Desktop.
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<script>
function main() {
if (WSRAW.scriptVersion(1)) return;
WS.gestureCallback('onPebbleClick', function (name) {
switch (name) {
case 'UP':
WS.say('up');
break;
case 'DOWN':
WS.say('down');
break;
case 'SELECT':
WS.say('select');
break;
case 'MULTI_SELECT':
WS.say('multiselect');
break;
}
});
}
window.onload = main;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment