blob: 95e31a50cc3c69bf9120e5fc0d35acbd135ec9d1 (
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
<!DOCTYPE html>
<!-- -*-coding: utf-8 -*-
vim: sw=2 ts=2 expandtab ai
-->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body { background-color: black; text-align: center; color: white }
h1 { margin: 0 }
small { color: gray }
a { color: white }
input { height: 1.5em; font-size: 1.2em; font-weight: bold }
.text { width: 93%; margin: 0.5em; text-align: center }
.submit { width: 93%; margin: 0.4em }
.param { display: inline-table; width: 95%; height: 3em }
.label,.checkbox { display: table-cell; vertical-align: middle }
.label { text-align: left }
.checkbox { text-align: right; width: 1.5em; height: 1.5em }
.example { width: 75%; display: inline-block; text-align: left; font-size: 0.6em }
</style>
<script>
var config = _CONFIG_;
function put_config() {
for (var param in config) {
var element = document.getElementById(param);
if (element) {
if (typeof config[param] === 'boolean') {
element.checked = config[param];
} else {
element.value = config[param];
}
}
}
}
function get_config() {
var form = document.getElementById('config_form');
for (config = {}, i = 0; i < form.length ; i++) {
id = form[i].id;
if (id != "save") {
if (form[i].type === 'checkbox') {
config[id] = form[i].checked;
} else {
config[id] = form[i].value;
}
}
}
return window.location.href = "pebblejs://close#" + encodeURIComponent(JSON.stringify(config));
}
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
</script>
</head>
<body onload="put_config();">
<h1>Mario</h1>
<small>by Denis Dzyubenko, mod by Alexey Avdyukhin</small>
<hr size="1" />
<form action="javascript: get_config();" id="config_form">
<div class="param">
<div class="label">
Show "no connection" icon<br>
<small>Show when phone is not connected</small>
</div>
<div class="checkbox">
<input type="checkbox" id="config_show_no_phone" class="checkbox">
</div>
</div>
<div class="param">
<div class="label">
Show battery icon<br>
<small>Show battery status</small>
</div>
<div class="checkbox">
<input type="checkbox" id="config_show_battery" class="checkbox">
</div>
</div>
<div class="param">
<div class="label">
Vibe on disconnect<br>
<small>Vibe when phone is disconnected</small>
</div>
<div class="checkbox">
<input type="checkbox" id="config_vibe" class="checkbox">
</div>
</div>
<div class="param">
<div class="label">
Inverse colors<br>
<small>Use black background</small>
</div>
<div class="checkbox">
<input type="checkbox" id="config_inverse" class="checkbox">
</div>
</div>
<hr size="1" />
<input type="submit" id="save" class="submit" value="Save and apply">
</body>
</html>
|