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
|
<html>
<head>
<title>Vimium Options</title>
<style type="text/css" media="screen">
body {
font-family:"helvetica neue", "helvetica", "arial", "sans";
width:600px;
margin:10px auto;
}
.example {
font-size:80%;
color:#555;
margin-left:20px;
}
.caption {
margin-right:10px;
}
td {
padding:5px 0;
}
textarea#excludedUrls {
width:450px;
min-height:100px;
}
#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:nth-child(1), td:nth-child(2) {
width:1px;
white-space:nowrap;
}
#buttonsPanel {
/* This should match the width of #excludedUrls */
width:450px;
text-align:right;
margin-top:18px;
}
</style>
<script type="text/javascript">
$ = function(id) { return document.getElementById(id); };
function initializeOptions() {
populateOptions();
var elements = ["scrollStepSize", "defaultZoomLevel", "excludedUrls"];
for (var i = 0; i < elements.length; i++)
$(elements[i]).addEventListener("change", enableSaveButton, false);
}
function enableSaveButton() { $("saveOptions").removeAttribute("disabled"); }
// Saves options to localStorage.
function saveOptions() {
localStorage["scrollStepSize"] = $("scrollStepSize").value
localStorage["defaultZoomLevel"] = $("defaultZoomLevel").value
localStorage["excludedUrls"] = $("excludedUrls").value;
$("saveOptions").disabled = true;
}
// Restores select box state to saved value from localStorage.
function populateOptions() {
// TODO(ilya): Create a single option list with defaults somewhere to share across various scripts.
var scrollStepSize = localStorage["scrollStepSize"] || 60;
var defaultZoomLevel = localStorage["defaultZoomLevel"] || 100;
var defaultExcludedUrls = localStorage["excludedUrls"] || "";
$("scrollStepSize").value = scrollStepSize;
$("defaultZoomLevel").value = defaultZoomLevel;
$("excludedUrls").value = defaultExcludedUrls;
}
function restoreToDefaults() {
scrollStepSize.value = "60";
defaultZoomLevel.value = "100";
excludedUrls.value = "";
$("saveOptions").disabled = true;
}
</script>
</head>
<body onload="initializeOptions()">
<h1>Vimium - Options</h1>
<table>
<tr>
<td class="caption">Scroll Step Size</td>
<td><input id="scrollStepSize" type="text" style="width:50px" />px</td>
<td><span class="example">(default: 60)</td>
</tr>
<tr>
<td><span class="caption">Default zoom level</span></td>
<td><input id="defaultZoomLevel" type="text" value="100" style="width:50px" />%</td>
<td><span class="example">(default: 100)</span></td>
</tr>
<tr>
<td colspan="3">
<div style="position:relative">
Excluded URLs<br/>
<div style="position:absolute; right:-240px; width:240px">
<div class="example">
e.g. http*://mail.google.com/*<br/>
This will disable Vimium on Gmail.<br/><br/>
Enter one URL per line.<br/>
</div>
</div>
<textarea id="excludedUrls"></textarea>
</div>
</td>
</tr>
</table>
<div id="buttonsPanel">
<button id="restoreSettings" onclick="restoreToDefaults()">Restore to Defaults</button>
<button id="saveOptions" disabled="true" onclick="saveOptions()">Save Options</button>
</div>
<h1>Command Reference</h1>
<pre>
<c-x> is to be interpreted as ctrl + x together.
Navigating the current page:
h scroll left
j scroll down
k scroll up
l scroll right
gg scroll to top of the page
G scroll to bottom of the page
<c-d> scroll down a page
<c-u> scroll up a page
<c-f> scroll down a full page
<c-b> scroll up a full page
f activate link hints mode to open in current page
F activate link hints mode to open in new tab
r reload
gf view source
zi zoom in
zo zoom out
/ enter find mode -- type your search query and hit enter to search or esc to cancel
n cycle forward to the next find match
N cycle backward to the previous find match
i enter insert mode -- all commands will be ignored until you hit esc to exit
y copy the current url to the clipboard
Navigating your history:
ba, H go back in history
fw, fo, L go forward in history
Manipulating tabs:
J, gT go one tab left
K, gt go one tab right
t create tab
d close current tab
u restore closed tab (i.e. unwind the 'd' command)
Vimium supports command repetition so, for example, hitting '5t' will open 5 tabs in rapid succession. ESC
will clear any partial commands in the queue.
</pre>
</body>
</html>
|