-
-
Notifications
You must be signed in to change notification settings - Fork 61
/
options.html
210 lines (179 loc) · 5.61 KB
/
options.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
206
207
208
209
210
<html>
<head>
<meta charset="utf-8">
<title>TransOver Extension Options</title>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="options_script.js"></script>
<style type="text/css">
body {
margin: 10px auto;
padding: 0 20px;
width: 550px;
}
body, table {
color: #4f4f4f;
font: normal normal normal 14px Verdana, Tahoma, sans-serif;
border-spacing: 0px;
}
input, button {
font-size: 14px;
}
select {
font-size: 16px;
}
td {
width: 140px;
}
div.content {
text-align: left;
}
div.heading {
text-align: left;
font-size: 1.3em;
}
.option {
min-width: 200px;
margin-top: 25px;
}
fieldset.option {
border-width: 1px;
border-radius: 5px;
border-style: solid;
border-color: #ccc;
}
div.button {
float: left;
}
div.button_group {
margin-top: 30px;
}
.flash {
display: none;
color: green;
margin-top: 4px;
margin-left: 8px;
}
.hint {
color: blue;
}
.help {
cursor: help;
border-bottom: 1px dotted;
}
.disabled {
color: #ccc;
}
.pulse {
border-radius: 3%;
border: 1px solid red;
box-shadow: 0 0 0 rgba(255, 0, 0, 0.4);
animation: pulse 2s infinite;
}
.pulse:hover {
animation: none;
}
.u-hidden {
display: none;
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4);
}
70% {
box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
}
}
</style>
</head>
<body>
<div class="content">
<div style="display: flex; align-items: center">
<h1>Configuration</h1>
<div class="flash">Saved!</div>
</div>
<div class="option">
<label for="target_lang">Translate into</label>
<select id="target_lang"></select>
<label for="translate_by">when I</label>
<select id="translate_by" name="translate_by">
<option value="click">click on word</option>
<option value="point">point at word</option>
</select>
</div>
<div class="option" id="more_options_link">
<a href="#">more options</a> >
</div>
<div id="more_options" style="display:none">
<div class="option">
<label for="from_lang">Translate from</label>
<select id="from_lang"></select>
</div>
<div class="option disabled">
<label for="reverse_lang">Reverse translate to</label>
<select id="reverse_lang" disabled></select>
<span class="hint"> (from 'Translate into')</span>
</div>
<div class="option">
<input type="checkbox" id="tts" name="tts"/>
<label for="tts">Enable Text-To-Speech</label>
<label for="tts_key">when I press
<select name="tts_key" id="tts_key"></select>
while popup is showing
</label>
</div>
<div class="option">
<input type="checkbox" id="show_from_lang"></input>
<label for="show_from_lang">Show 'translated from' language</label>
</div>
<div class="option">
<input type="checkbox" id="word_key_only" name="word_key_only"/>
<label for="word_key_only">Only show word translation when</label>
<label for="word_key_only_key"> I hold the
<select name="word_key_only_key" id="word_key_only_key"></select>
key</label>
</div>
<div class="option">
<input type="checkbox" id="selection_key_only" name="selection_key_only"/>
<label for="selection_key_only">Only show selection translation when</label>
<label for="selection_key_only_key"> I hold the
<select name="selection_key_only_key" id="selection_key_only_key"></select>
key</label>
</div>
<div class="option disabled">
<label for="delay">Wait for</label>
<input type="number" id="delay" name="delay" disabled />
<span>ms before showing translation</span>
</div>
<div class="option">
<input type="checkbox" id="do_not_show_oops" name="do_not_show_oops"/>
<label for="do_not_show_oops">Do not show 'Oops... No translation found'</label>
</div>
<div class="option">
<label for="fontSize">Font size</label>
<input type="number" name="fontSize" id="fontSize" min="10", max="24"> px
</div>
<div class="option firefox-option u-hidden">
Configure "copy translation" hotkey in "Manage Extension Shortcuts".
</div>
<div class="option chrome-option u-hidden">
Configure "type and translate" and "copy translation" hotkeys <a class="set_hotkey" href='#'>here</a>
</div>
<div class="option">Don't translate words on these sites:</div>
<table id='exc_urls_table'></table>
<div class="option">Only translate words on these sites:</div>
<table id='only_urls_table'></table>
</div>
<div class="button_group">
<div style="display: flex">
<div class="button">
<button id="save_button">Save</button>
</div>
<div class="flash">Saved!</div>
</div>
</div>
</div>
</body>
</html>