forked from openstyles/stylus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
324 lines (304 loc) · 11.7 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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<!DOCTYPE html>
<html id="stylus">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title i18n="+optionsHeading">Stylus </title>
<link href="icons.ttf" rel="preload" as="font" crossorigin="anonymous">
<link href="global.css" rel="stylesheet">
<link href="global-dark.css?bugfix" rel="stylesheet"> <!-- https://crbug.com/1298600 -->
<script src="content/style-injector.js"></script>
<script src="js/browser.js"></script>
<script src="js/toolbox.js"></script>
<script src="js/msg.js"></script>
<script src="js/prefs.js"></script>
<script src="js/dom.js"></script>
<script src="js/localization.js"></script>
<script src="content/apply.js"></script>
<link rel="stylesheet" href="options/onoffswitch.css">
<link rel="stylesheet" href="options/options.css">
<template data-id="shortcutsFF">
<p style="line-height: 1.5" i18n="shortcutsNoteFF"></p>
<table style="margin: 0 auto">
<tr>
<td i18n="optionsCustomizePopup"></td>
<td><input id="hotkey._execute_browser_action" type="search"></td>
</tr>
<tr>
<td i18n="openManage"></td>
<td><input id="hotkey.openManage" type="search"></td>
</tr>
<tr>
<td i18n="disableAllStyles"></td>
<td><input id="hotkey.styleDisableAll" type="search"></td>
</tr>
</table>
<p style="text-align: center">
<a href="https://developer.mozilla.org/Add-ons/WebExtensions/manifest.json/commands#Key_combinations"
target="_blank" i18n="helpAlt"></a>
</p>
</template>
<script src="options/options-sync.js"></script>
<script src="js/themer.js"></script> <!-- must be last in HEAD to avoid FOUC -->
<template data-id="body">
<header>
<img src="/images/icon/128.png" width="32" height="32">
<h1 i18n="optionsHeading"></h1>
<i class=i-close tabindex="0"></i>
</header>
<main>
<div class="block" id="updates">
<h2 i18n="optionsCustomizeUpdate"></h2>
<div class="items swap">
<label>
<span i18n="optionsUpdateInterval" data-clickable="0"></span>
<input type="number" min="0" id="updateInterval">
</label>
<label>
<span i18n="manageOnlyEnabled"></span>
<input type="checkbox" id="updateOnlyEnabled" class="slider">
</label>
</div>
</div>
<div class="block sync-options">
<h2 i18n="optionsCustomizeSync"></h2>
<div class="items swap">
<label>
<span class="sync-status"></span>
<div class="select-wrapper">
<select class="cloud-name">
<option value="none" i18n="optionsSyncNone"></option>
<option value="dropbox">Dropbox</option>
<option value="google">Google Drive</option>
<option value="onedrive">OneDrive</option>
<option value="webdav">WebDAV</option>
</select>
</div>
</label>
<table class="drive-options" data-drive="webdav">
<tr>
<td i18n="optionsSyncUrl"></td>
<td><input type="url" data-option="url"></td>
</tr>
<tr>
<td i18n="optionsSyncUsername"></td>
<td><input type="text" data-option="username"></td>
</tr>
<tr>
<td i18n="optionsSyncPassword"></td>
<td><input type="password" data-option="password"></td>
</tr>
</table>
<div class="actions">
<button class="connect"></button>
<button class="sync-now" i18n="optionsSyncSyncNow"></button>
<button class="sync-login" i18n="optionsSyncLogin"></button>
</div>
</div>
</div>
<div class="block">
<h2 i18n="stylePreferSchemeLabel"></h2>
<div class="items no-stretch">
<label class="radio-wrapper" i18n="+preferSchemeDark">
<input type="radio" value="dark" name="schemeSwitcher.enabled">
</label>
<label class="radio-wrapper" i18n="+preferSchemeLight">
<input type="radio" value="light" name="schemeSwitcher.enabled">
</label>
<label class="radio-wrapper" i18n="+optionsAdvancedAutoSwitchSchemeBySystem">
<input type="radio" value="system" name="schemeSwitcher.enabled">
</label>
<label class="radio-wrapper">
<input type="radio" value="time" name="schemeSwitcher.enabled">
<span i18n="optionsAdvancedAutoSwitchSchemeByTime"></span>
<input type="time" required id="schemeSwitcher.nightStart">
~
<input type="time" required id="schemeSwitcher.nightEnd">
</label>
<label class="radio-wrapper" i18n="+optionsAdvancedAutoSwitchSchemeNever">
<input type="radio" value="never" name="schemeSwitcher.enabled">
</label>
</div>
</div>
<div class="block">
<h2 i18n="optionsCustomizeIcon"></h2>
<div class="items no-stretch">
<label>
<span class="radio-wrapper" i18n="+optionsIconAuto">
<input type="radio" name="iconset" value="-1" data-value-type="number">
</span>
<span></span>
</label>
<label>
<span class="radio-wrapper" i18n="+optionsIconDark">
<input type="radio" name="iconset" value="0" data-value-type="number">
</span>
<span>
<img src="/images/icon/16.png">
<img src="/images/icon/16w.png">
<img src="/images/icon/16x.png">
</span>
</label>
<label>
<span class="radio-wrapper" i18n="+optionsIconLight">
<input type="radio" name="iconset" value="1" data-value-type="number">
</span>
<span>
<img src="/images/icon/light/16.png">
<img src="/images/icon/light/16w.png">
<img src="/images/icon/light/16x.png">
</span>
</label>
</div>
</div>
<div class="block">
<h2 i18n="optionsCustomizeBadge"></h2>
<div class="items swap">
<label>
<span i18n="prefShowBadge"></span>
<input type="checkbox" id="show-badge" class="slider">
</label>
<label>
<span i18n="optionsBadgeNormal"></span>
<input type="color" id="badgeNormal">
</label>
<label>
<span i18n="optionsBadgeDisabled"></span>
<input type="color" id="badgeDisabled">
</label>
</div>
</div>
<div class="block">
<h2 i18n="optionsCustomizePopup"></h2>
<div class="items swap">
<label>
<span i18n="optionsPopupWidth"></span>
<input type="number" id="popupWidth" min="200" max="800">
</label>
<label>
<span i18n="popupStylesFirst"></span>
<input type="checkbox" id="popup.stylesFirst" class="slider">
</label>
<label>
<span i18n="popupAutoResort"></span>
<input type="checkbox" id="popup.autoResort" class="slider">
</label>
<label class="chromium-only chrome-no-popup-border">
<span i18n="popupBorders, title:popupBordersTooltip"></span>
<input type="checkbox" id="popup.borders" class="slider">
</label>
</div>
</div>
<div class="block">
<h2 i18n="styleEditor"></h2>
<div class="items swap">
<label>
<span i18n="popupOpenEditInWindow">
<a i18n="title:popupOpenEditInWindowTooltip"
data-cmd="note" class="icon" tabindex="0">
<i class="i-info"></i>
</a>
</span>
<input type="checkbox" id="openEditInWindow" class="slider">
</label>
<label show-if="openEditInWindow">
<span i18n="popupOpenEditInPopup"></span>
<input type="checkbox" id="openEditInWindow.popup" class="slider">
</label>
<label class="chromium-only">
<span i18n="optionsAdvancedContextDelete"></span>
<input type="checkbox" id="editor.contextDelete" class="slider">
</label>
</div>
</div>
<div class="block">
<h2 i18n="styleManager"></h2>
<div class="items swap">
<label>
<span i18n="manageNewUI"></span>
<input type="checkbox" id="manage.newUI" class="slider">
</label>
<label show-if="manage.newUI" id="favs">
<span i18n="manageFavicons">
<a i18n="title:manageFaviconsHelp"
data-cmd="note" class=icon tabindex="0">
<i class=i-info></i>
</a>
</span>
<input type="checkbox" id="manage.newUI.favicons" class="slider">
</label>
<label show-if="manage.newUI.favicons">
<span i18n="manageFaviconsGray"></span>
<input type="checkbox" id="manage.newUI.faviconsGray" class="slider">
</label>
<label>
<span i18n="manageMaxTargets"></span>
<input id="manage.newUI.targets" type="number" min="0" max="99">
</label>
<label>
<span i18n="manageMinColumnWidth" data-clickable="9999" class="no-stretch"></span>
<input id="manage.minColumnWidth" type="number" min="300" max="9999">
</label>
</div>
</div>
<div class="block" id="advanced">
<h2 i18n="optionsAdvanced"></h2>
<div class="items swap">
<label>
<span i18n="optionsAdvancedStyleViaXhr">
<a i18n="title:optionsAdvancedStyleViaXhrNote"
data-cmd="note" class=icon tabindex="0">
<i class=i-info></i>
</a>
</span>
<input type="checkbox" id="styleViaXhr" class="slider">
</label>
<label>
<span i18n="html:optionsAdvancedPatchCsp">
<a i18n="title:optionsAdvancedPatchCspNote"
data-cmd="note" class=icon tabindex="0">
<i class=i-info></i>
</a>
</span>
<input type="checkbox" id="patchCsp" class="slider">
</label>
<label>
<span i18n="optionsAdvancedExposeIframes">
<a i18n="title:optionsAdvancedExposeIframesNote"
data-cmd="note" class=icon tabindex="0">
<i class=i-info></i>
</a>
</span>
<input type="checkbox" id="exposeIframes" class="slider">
</label>
<label class="chromium-only">
<span i18n="optionsAdvancedExposeStyleName">
<a i18n="title:optionsAdvancedExposeStyleNameNote"
data-cmd="note" class=icon tabindex="0">
<i class=i-info></i>
</a>
</span>
<input type="checkbox" id="exposeStyleName" class="slider">
</label>
<label>
<span i18n="optionsUrlInstaller"></span>
<input type="checkbox" id="urlInstaller" class="slider">
</label>
</div>
</div>
<div class="block">
<h2 i18n="cm_theme"></h2>
<div class="items no-stretch" i18n="optionsStylusThemes"></div>
</div>
</main>
<footer>
<button id="reset" i18n="optionsResetButton, title:optionsReset"></button>
<button id="shortcuts" i18n="shortcuts, title:shortcutsNote"></button>
<button id="manage" i18n="confirmClose"></button>
</footer>
</template>
</head>
<body id="stylus-options">
<script src="options/options.js"></script>
</body>
</html>