blob: b2757f3c2ecf96ef37a2ccfde8875502cbd78c1e (
plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body { background-color: black; text-align: center; color: white }
h1,h3 { margin: 0; padding: 0 }
h3 { color: gray }
h4 { text-align: center; margin: 0; padding: 0 }
input { height: 40px; font-size: 20px }
.url { width: 95% }
.submit { width: 50% }
.example { text-align: left }
</style>
</head>
<body>
<h1>My Data</h1>
<h3>v1.1.0, by bahbka</h3>
<br><br>
<form action="javascript: settings();" id="settings_form">
<h4>my server URL:</h4>
<input type="text" id="url" class="url" value="_URL_">
<input type="submit" id="save" class="submit" value="save and apply">
</form>
<br><br><br>
sample server output:
<pre class="example">
{
"content": "Hello\\nWorld!",
"refresh": 300, // refresh delay, seconds
"vibrate": 0, // 0..3, 0 - don't vibrate
"font": 1, // 1..8, try them all
"theme": 0 // 0 - black, 1 - white
}
GET param short=1 or long=1 added to URL on
short or long select button update
</pre>
<script>
function settings() {
var form = document.getElementById('settings_form');
for (configuration = {}, i = 0; i < form.length ; i++) {
id = form[i].id;
if (id != "save") {
configuration[id] = form[i].value;
}
}
return window.location.href = "pebblejs://close#" + encodeURIComponent(JSON.stringify(configuration));
}
</script>
</body>
</html>
|