-
Notifications
You must be signed in to change notification settings - Fork 460
/
popup.html
205 lines (192 loc) · 4.56 KB
/
popup.html
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<html>
<head>
<title>Talking Alarm Clock</title>
<link href='http://fonts.googleapis.com/css?family=Nova%20Mono' rel='stylesheet' type='text/css'>
<style>
body {
overflow: hidden;
margin-top: 0px;
}
#main {
width: 200px;
font-family: arial, helvetica, sans-serif;
font-size: 13;
}
#clock {
cursor: pointer;
}
.alarm_wrap {
margin-top: 6px;
padding: 6px;
background-color: #dfd;
border: 1px solid #aaa;
border-radius: 4px;
}
.alarm_wrap.disabled {
background-color: #eee;
}
.alarm_wrap[aria-invalid] {
background-color: #f99;
}
.alarm_wrap[aria-invalid] input {
color: #900;
}
.alarm_wrap input {
font-size: 20;
}
.alarm_wrap input[type=time] {
font-size: 20;
width: 85px;
}
.alarm_wrap.disabled input {
color: #999;
}
.ctrl_label {
float: left;
width: 100%;
margin-top: 6px;
}
.ctrl_wrap {
width: 200px;
float: left;
}
.ctrl_wrap input[type=range] {
width: 180px;
height: 16px;
}
.buttons {
margin-top: 10px;
}
.voice_options {
}
#sound {
float: left;
width: 160px;
margin: 8px 0px;
}
#playsound {
padding: 5px;
margin: 5px;
}
#phrase {
float: left;
width: 160px;
}
#playspeech {
padding: 5px;
margin: 5px;
}
#a1_tt {
font-family: Nova Mono;
height: 34px;
}
#a2_tt {
font-family: Nova Mono;
height: 34px;
}
#a1_ampm {
font-family: Nova Mono;
}
#a2_ampm {
font-family: Nova Mono;
}
#current_time {
font-family: Nova Mono;
font-size: 24;
height: 32px;
}
body.nooutline * {
outline: none;
}
.footer {
clear:left;
}
</style>
<script src="common.js"></script>
<script src="popup.js"></script>
</head>
<body>
<div id="main">
<center>
<canvas id="clock" width="150" height="150"
role="button" tabindex="0"></canvas>
<div id="current_time">00:00:00</div>
</center>
<div id="a1_wrap" class="alarm_wrap">
<label for="a1_on">Alarm 1</label>
<br>
<input id="a1_on" type="checkbox">
<input id="a1_tt" type="time" step="300" size="5">
<select id="a1_ampm">
<option>AM</option>
<option selected>PM</option>
</select>
</div>
<div id="a2_wrap" class="alarm_wrap">
<label for="a2_on">Alarm 2</label>
<br>
<input id="a2_on" type="checkbox">
<input id="a2_tt" type="time" step="300" size="5">
<select id="a2_ampm">
<option>AM</option>
<option selected>PM</option>
</select>
</div>
<div class="voice_options">
<div>
<div class="ctrl_label">
<label for="sound">Sound:</label>
</div>
<div class="ctrl_wrap">
<select id="sound" class="ctrl">
<option value="none">None</option>
<option selected value="cuckoo">Cuckoo Clock</option>
<option value="digital">Digital Alarm Clock</option>
<option value="metal">Metal</option>
<option value="ringing">Ringing Alarm Clock</option>
<option value="rooster">Rooster</option>
</select>
<button id="playsound" title="Play Sound">
<img src="play.png">
</button>
</div>
<div class="ctrl_label">
<label for="sound">Phrase (use $TIME to say time):</label>
</div>
<div class="ctrl_wrap">
<textarea id="phrase"></textarea>
<button id="playspeech" title="Play Speech">
<img src="play.png">
</button>
</div>
<div class="ctrl_label">
<label for="voice">Voice:</label>
</div>
<div class="ctrl_wrap">
<select id="voice" class="ctrl"></select>
</div>
<div class="ctrl_label">
<label for="rate">Speech rate:</label>
</div>
<div class="ctrl_wrap">
<input id="rate" type="range" class="ctrl"
min=0.5 max=1.5 step=0.1 value=1.0></input>
</div>
<div class="ctrl_label">
<label for="volume">Speech and sound volume:</label>
</div>
<div class="ctrl_wrap">
<input id="volume" type="range" class="ctrl"
min=0.0 max=1.0 step=0.1 value=1.0></input>
</div>
</div>
</div>
<div class="footer">
<a href="credits.html" target="_blank">Credits</a>
|
<a href="https://chrome.google.com/webstore/search?q=tts"
target="_blank">Get more voices</a>
</div>
</div>
</body>
</html>