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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
|
<html>
<head>
<title>Vimium Options</title>
<script src="../lib/utils.js"></script>
<script src="../lib/keyboard_utils.js"></script>
<script src="../lib/dom_utils.js"></script>
<script src="../lib/handler_stack.js"></script>
<script src="../lib/clipboard.js"></script>
<script src="../content_scripts/link_hints.js"></script>
<script src="../content_scripts/vomnibar.js"></script>
<script src="../content_scripts/scroller.js"></script>
<script src="../content_scripts/vimium_frontend.js"></script>
<style type="text/css" media="screen">
body {
font: 14px "DejaVu Sans", "Arial", sans-serif;
color: #303942;
width: 680px;
margin: 0 auto;
}
a, a:visited { color: #15c; }
a:active { color: #052577; }
div#wrapper { width: 538px; }
header {
font-size: 18px;
font-weight: normal;
border-bottom: 1px solid #eee;
padding: 20px 0 15px 0;
width: 100%;
}
button {
-webkit-user-select: none;
-webkit-appearance: none;
background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
border: 1px solid rgba(0, 0, 0, 0.25);
border-radius: 2px;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
color: #444;
font: inherit;
text-shadow: 0 1px 0 #f0f0f0;
height: 24px;
font-size: 12px;
padding: 0 10px;
}
button:hover {
background-image: -webkit-linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
border-color: rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.95);
color: black;
}
button:active {
background-image: -webkit-linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
box-shadow: none;
text-shadow: none;
}
button[disabled], button[disabled]:hover, button[disabled]:active {
background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
border: 1px solid rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
text-shadow: 0 1px 0 #f0f0f0;
color: #888;
}
input[type="checkbox"] {
-webkit-user-select: none;
}
label:hover {
color: black;
}
pre, code, .code {
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
pre {
margin: 5px;
border-left: 1px solid #eee;
padding-left: 5px;
}
input, textarea {
box-sizing: border-box;
}
textarea {
/* Horizontal resizing is pretty screwy-looking. */
resize: vertical;
}
table#options{
width: 100%;
font-size: 14px;
position: relative;
border-spacing: 0 23px;
}
.example {
font-size: 12px;
line-height: 16px;
color: #979ca0;
margin-left: 20px;
}
.info {
margin-left: 0px;
}
.caption {
margin-right: 10px;
min-width: 130px;
padding-top: 3px;
vertical-align: top;
}
td { padding: 0; }
div#exampleKeyMapping {
margin-left: 10px;
margin-top: 5px;
}
input#linkHintCharacters {
width: 100%;
}
input#linkHintNumbers {
width: 100%;
}
input#linkHintCharacters {
width: 100%;
}
input#scrollStepSize {
width: 40px;
margin-right: 3px;
}
textarea#userDefinedLinkHintCss {
width: 100%;;
min-height: 100px;
}
textarea#keyMappings {
width: 100%;
min-height: 135px;
}
textarea#searchEngines {
width: 100%;
min-height: 135px;
}
input#previousPatterns, input#nextPatterns {
width: 100%;
}
input#searchUrl {
width: 100%;
}
#status {
margin-left: 10px;
font-size: 80%;
}
/* Make the caption in the settings table as small as possible, to pull the other fields to the right. */
td:first-child {
width: 1px;
white-space: nowrap;
}
#buttonsPanel { width: 100%; }
#advancedOptions { display: none; }
#advancedOptionsLink { line-height: 24px; }
#saveOptions { float: right; }
#saveOptions { margin-right: 0; }
#showHelpDialogMessage { width: 100%; }
.help {
position: absolute;
right: -320px;
width: 320px;
}
input:read-only {
background-color: #eee;
color: #666;
pointer-events: none;
-webkit-user-select: none;
}
input[type="text"], textarea {
border: 1px solid #bfbfbf;
border-radius: 2px;
color: #444;
font: inherit;
padding: 3px;
}
button:focus, input[type="text"]:focus, textarea:focus {
-webkit-transition: border-color 200ms;
border-color: #4d90fe;
outline: none;
}
/* Boolean options have a tighter form representation than text options. */
td.booleanOption { font-size: 12px; }
footer {
padding: 15px 0;
border-top: 1px solid #eee;
}
/* Ids and classes for rendering exclusionRules */
#exclusionScrollBox {
overflow: scroll;
overflow-x: hidden;
overflow-y: auto;
height: 180px;
border: 1px solid #bfbfbf;
border-radius: 2px;
color: #444;
}
input.pattern, input.passKeys {
font-family: Consolas, "Liberation Mono", Courier, monospace;
font-size: 14px;
}
.pattern {
width: 250px;
}
.passKeys {
width: 120px;
}
#exclusionAddButton {
float: right;
margin-top: 5px;
margin-right: 0px;
}
</style>
<link rel="stylesheet" type="text/css" href="../content_scripts/vimium.css" />
<script type="text/javascript" src="options.js"></script>
</head>
<body>
<div id="wrapper">
<header>Vimium Options</header>
<table id="options">
<tr>
<td class="caption">Excluded URLs<br/>and keys</td>
<td>
<div class="help">
<div class="example">
The left column contains URL patterns. Vimium will be wholly or partially disabled for URLs matching these patterns. Patterns are Javascript regular expressions. Additionally, the character "*" matches any zero or more characters.
<br/><br/>
The right column contains keys which Vimium would would normally handle, but should instead be passed through to the underlying web page (for pages matching the corresponding pattern). If empty, then Vimium is wholly disabled.
</div>
</div>
<div>
<div id="exclusionScrollBox">
<table id="exclusionRules"></table>
<template id="exclusionRuleTemplate">
<tr>
<td><input/ type="text" class="pattern" placeholder="URL pattern"></td>
<td><input/ type="text" class="passKeys" placeholder="Exclude keys"></td>
<td><input/ type="button" class="exclusionRemoveButton" tabindex = "-1" value="✖"></td>
</tr>
</template>
</div>
<button id="exclusionAddButton">Add Rule</button>
</div>
</td>
</tr>
<tr>
<td class="caption">Custom key<br/>mappings</td>
<td id="mappingsHelp" verticalAlign="top">
<div class="help">
<div class="example">
<!-- TODO(ilya/philc): Expand this and style it better. -->
Enter commands to remap your keys. Available commands:<br/>
<pre id="exampleKeyMapping">
map j scrollDown
unmap j
unmapAll
" this is a comment
# this is also a comment</pre>
<a href="#" id="showCommands">Show available commands.</a>
</div>
</div>
<textarea id="keyMappings" type="text"></textarea>
</td>
</tr>
<tr>
<td class="caption">Custom Search<br/>Engines</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
Use this to add shortcuts for your common search engines when using the Vomnibar.<br/><br/>
The format is:<br/>
<pre>your-keyword: http://the-site.com/?q=%s</pre>
%s will be replaced with your search term.<br/>
Lines which start with "#" are comments.
</div>
</div>
<textarea id="searchEngines"></textarea>
</td>
</tr>
<tbody id='advancedOptions'>
<tr>
<td class="caption">Scroll step size</td>
<td>
<input id="scrollStepSize" type="number" />px
</td>
</tr>
<tr>
<td class="caption">Characters used<br/> for link hints</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
The characters placed next to each link after typing "F" to enter link hinting mode.
</div>
</div>
<input id="linkHintCharacters" type="text" />
<div class="nonEmptyTextOption">
</td>
</tr>
<tr>
<td class="caption">Numbers used<br/> for filtered link hints</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
The numbers placed next to each link after typing "F" to enter link hinting mode.
</div>
</div>
<input id="linkHintNumbers" type="text" />
<div class="nonEmptyTextOption">
</td>
</tr>
<tr>
<td class="caption"></td>
<td verticalAlign="top" class="booleanOption">
<div class="help">
<div class="example">
After typing "F" to enter link hinting mode, this option lets you select a link by typing its text.
</div>
</div>
<label>
<input id="filterLinkHints" type="checkbox"/>
Use the link's name and numbers for link hint filtering
</label>
</td>
</tr>
<tr>
<td class="caption"></td>
<td verticalAlign="top" class="booleanOption">
<div class="help">
<div class="example">
The Heads-Up Display appears when typing into text boxes.
</div>
</div>
<label>
<input id="hideHud" type="checkbox"/>
Hide the Heads Up Display (HUD)
</label>
</td>
</tr>
<tr>
<td class="caption"></td>
<td verticalAlign="top" class="booleanOption">
<div class="help">
<div class="example">
Switch back to plain find mode by using the <code>\R</code> escape sequence.
</div>
</div>
<label>
<input id="regexFindMode" type="checkbox"/>
Treat find queries as regular expressions.
</label>
</td>
</tr>
<tr>
<td class="caption">Previous Patterns</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
Vimium will match against these patterns when using the "navigate to the previous page"
command.
</div>
</div>
<input id="previousPatterns" type="text" />
<div class="nonEmptyTextOption">
</td>
</tr>
<tr>
<td class="caption">Next Patterns</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
Vimium will match against these patterns when using the "navigate to the next page" command.
</div>
</div>
<input id="nextPatterns" type="text" />
<div class="nonEmptyTextOption">
</td>
</tr>
<tr>
<td class="caption">Default Search<br/>Engine</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
The search engine which is used when searching from the Vomnibar
(e.g.: "http://duckduckgo.com/?q=").
</div>
</div>
<input id="searchUrl" type="text" />
<div class="nonEmptyTextOption">
</td>
</tr>
<tr>
<td class="caption">CSS for link hints</td>
<td verticalAlign="top">
<div class="help">
<div class="example">
The CSS used to style the characters next to each link hint.<br/><br/>
Note: these styles are used in addition to and take precedence over Vimium's
default styles.
</div>
</div>
<textarea id="userDefinedLinkHintCss" class="code" type="text"></textarea>
<div class="nonEmptyTextOption">
</td>
</tr>
</tbody>
</table>
<div id="buttonsPanel">
<a href="#" id="advancedOptionsLink">Show advanced options…</a>
<button id="saveOptions" disabled="true">Save Options</button>
</div>
<br/>
<footer id="showHelpDialogMessage">
To view all available shortcuts, type <strong>?</strong> to show the Vimium help dialog.
</footer>
</div>
</body>
</html>
|