Created
June 23, 2015 15:22
-
-
Save yoshimov/9dc26302ac8d3863cd62 to your computer and use it in GitHub Desktop.
Configuration page for Pebble-HabitRPG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<h2>HabitRPG for Pebble configuration</h2> | |
<table> | |
<tr> | |
<th>Your UUID: </th><td><input type="text" id="uuid" name="uuid" size="60" /></td> | |
</tr> | |
<tr> | |
<th>API Key: </th> | |
<td><input type="text" id="key" name="key" size="60" /></td> | |
</tr> | |
</table> | |
<input type="button" name="save" value="Save" onclick="save_option()" /> | |
<script type="text/javascript"> | |
function save_option() { | |
var uuidobj = document.getElementById("uuid"); | |
var keyobj = document.getElementById("key"); | |
var conf = {"uuid2": uuidobj.value, "key2": keyobj.value}; | |
location.href = 'pebblejs://close#' + encodeURIComponent(JSON.stringify(conf)); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment