forked from infokiller/web-search-navigator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options_page.html
306 lines (300 loc) · 14.8 KB
/
options_page.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
<!DOCTYPE html>
<html>
<head>
<title>Options for Web Search Navigator</title>
<link rel="stylesheet" href="options_page.css">
</head>
<body>
<section id="general-settings-container">
<h2>General settings</h2>
<div class="option">
<label for="wrap-navigation">
<input type="checkbox" id="wrap-navigation"> Wrap around when navigating before/after the first/last search result
</label>
</div>
<div class="option">
<label for="auto-select-first">
<input type="checkbox" id="auto-select-first"> Focus on first search result automatically after the page loads
</label>
</div>
</section>
<section id="google-settings-container">
<h2>Google specific settings</h2>
<div class="option">
<label for="google-include-cards">
<input type="checkbox" id="google-include-cards"> Include cards (top stories, twitter, videos) in regular Google search page
</label>
</div>
<div class="option">
<label for="google-include-places">
<input type="checkbox" id="google-include-places"> Include Places in regular Google search page
</label>
</div>
<div class="option">
<label for="google-include-memex">
<input type="checkbox" id="google-include-memex"> Include WorldBrain's Memex extension results in Google search page
</label>
</div>
</section>
<section id="keybindings-container">
<h2>Keybindings</h2>
<details>
<summary><h3>Help</h3></summary>
<div class="help">
All keybindings should be specified in
<a href="https://github.com/ccampbell/mousetrap" target="_blank">Mousetrap</a> format. Examples:
<ul>
<li>
<kbd class="keybinding">a</kbd>
</li>
<li>
<kbd class="keybinding">z y</kbd>
</li>
<li>
<kbd class="keybinding">ctrl+a</kbd>
</li>
<li>
<kbd class="keybinding">command+a</kbd>
</li>
<li>
<kbd class="keybinding">a, ctrl+b, z y, command+c</kbd> - multiple shortcuts that will be treated equivalently</li>
</ul>
Special keys names: backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown,
del, delete, and f1 through f19. In order to disable a keybinding, delete its keybinding in the textbox.
Note that not all search engines support all the keybindings.
</div>
</details>
<details>
<summary><h3>Common actions</h3></summary>
<div class="option">
<label for="next-key" class="option-desc">Next search result</label>
<input id="next-key" class="input-keybinding" type="text" value="down, j">
</div>
<div class="option">
<label for="previous-key" class="option-desc">Previous search result</label>
<input id="previous-key" class="input-keybinding" type="text" value="up, k">
</div>
<div class="option">
<label for="navigate-key" class="option-desc">Open</label>
<input id="navigate-key" class="input-keybinding" type="text" value="return, space">
</div>
<div class="option">
<label for="navigate-new-tab-background-key" class="option-desc">Open in a new background tab</label>
<input id="navigate-new-tab-background-key" class="input-keybinding" type="text" value="ctrl+shift+return, command+shift+return, ctrl+shift+space">
</div>
<div class="option">
<label for="navigate-new-tab-key" class="option-desc">Open in a new window/tab</label>
<input id="navigate-new-tab-key" class="input-keybinding" type="text" value="ctrl+return, command+return, ctrl+space">
</div>
<div class="option">
<label for="focus-search-input" class="option-desc">Focus search box</label>
<input id="focus-search-input" class="input-keybinding" type="text" value="/, escape">
</div>
<div class="option">
<label for="navigate-next-result-page" class="option-desc">Next page</label>
<input id="navigate-next-result-page" class="input-keybinding" type="text" value="right">
</div>
<div class="option">
<label for="navigate-previous-result-page" class="option-desc">Previous page</label>
<input id="navigate-previous-result-page" class="input-keybinding" type="text" value="left">
</div>
<div class="option">
<label for="copy-url-key" class="option-desc">Copy URL of focus</label>
<input id="copy-url-key" class="input-keybinding" type="text" value="">
</div>
</details>
<details>
<summary><h3>Results filtering</h3></summary>
<div class="option">
<label for="navigate-show-all" class="option-desc">Turn off filter (show all results)</label>
<input id="navigate-show-all" class="input-keybinding" type="text" value="z z, ctrl-shift-a">
</div>
<div class="option">
<label for="navigate-show-hour" class="option-desc">Filter results by past hour</label>
<input id="navigate-show-hour" class="input-keybinding" type="text" value="z h, ctrl-shift-h">
</div>
<div class="option">
<label for="navigate-show-day" class="option-desc">Filter results by past 24 hours</label>
<input id="navigate-show-day" class="input-keybinding" type="text" value="z d, ctrl-shift-d">
</div>
<div class="option">
<label for="navigate-show-week" class="option-desc">Filter results by past week</label>
<input id="navigate-show-week" class="input-keybinding" type="text" value="z w, ctrl-shift-w">
</div>
<div class="option">
<label for="navigate-show-month" class="option-desc">Filter results by past month</label>
<input id="navigate-show-month" class="input-keybinding" type="text" value="z m, ctrl-shift-m">
</div>
<div class="option">
<label for="navigate-show-year" class="option-desc">Filter results by past year</label>
<input id="navigate-show-year" class="input-keybinding" type="text" value="z y, ctrl-shift-y">
</div>
<div class="option">
<label for="toggle-sort" class="option-desc">Toggle sort by date/relevance</label>
<input id="toggle-sort" class="input-keybinding" type="text" value="z s, ctrl-shift-s">
</div>
<div class="option">
<label for="toggle-verbatim-search" class="option-desc">Toggle verbatim search</label>
<input id="toggle-verbatim-search" class="input-keybinding" type="text" value="z v, ctrl-shift-v">
</div>
<div class="option">
<label for="show-images-large" class="option-desc">Filter image results by large size</label>
<input id="show-images-large" class="input-keybinding" type="text" value="z l">
</div>
<div class="option">
<label for="show-images-medium" class="option-desc">Filter image results by medium size</label>
<input id="show-images-medium" class="input-keybinding" type="text" value="z e">
</div>
<div class="option">
<label for="show-images-icon" class="option-desc">Filter image results by icon size</label>
<input id="show-images-icon" class="input-keybinding" type="text" value="z i">
</div>
</details>
<details>
<summary><h3>Google and Startpage</h3></summary>
<div class="option">
<label for="navigate-search-tab" class="option-desc">Go to All (= default search tab)</label>
<input id="navigate-search-tab" class="input-keybinding" type="text" value="a, s">
</div>
<div class="option">
<label for="navigate-images-tab" class="option-desc">Go to Images</label>
<input id="navigate-images-tab" class="input-keybinding" type="text" value="i">
</div>
<div class="option">
<label for="navigate-videos-tab" class="option-desc">Go to Videos</label>
<input id="navigate-videos-tab" class="input-keybinding" type="text" value="v">
</div>
<div class="option">
<label for="navigate-maps-tab" class="option-desc">Go to Maps</label>
<input id="navigate-maps-tab" class="input-keybinding" type="text" value="m">
</div>
<div class="option">
<label for="navigate-news-tab" class="option-desc">Go to News</label>
<input id="navigate-news-tab" class="input-keybinding" type="text" value="n">
</div>
<div class="option">
<label for="navigate-shopping-tab" class="option-desc">Go to Shopping</label>
<input id="navigate-shopping-tab" class="input-keybinding" type="text" value="alt+n">
</div>
<div class="option">
<label for="navigate-books-tab" class="option-desc">Go to Books</label>
<input id="navigate-books-tab" class="input-keybinding" type="text" value="b">
</div>
<div class="option">
<label for="navigate-flights-tab" class="option-desc">Go to Flights</label>
<input id="navigate-flights-tab" class="input-keybinding" type="text" value="alt+l">
</div>
<div class="option">
<label for="navigate-financial-tab" class="option-desc">Go to Financial</label>
<input id="navigate-financial-tab" class="input-keybinding" type="text" value="f">
</div>
</details>
</section>
<section id="search-engines-container">
<h2>EXPERIMENTAL: Alternative search engines</h2>
<details class="help">
<summary><h3>Help</h3></summary>
There is experimental support for using this extension in the websites below.
Note that some features are still buggy in certain websites.
You can enable or disable the extension of these websites at any time by clicking on the checkboxes.
When you enable a website, the browser will prompt you for additional permissions which are needed to be able to run this extension on that website.
</details>
<div class="option">
<label for="brave-search">
<input type="checkbox" id="brave-search"> Enable on Brave Search
</label>
</div>
<div class="option">
<label for="startpage">
<input type="checkbox" id="startpage"> Enable on Startpage
</label>
</div>
<div class="option">
<label for="youtube">
<input type="checkbox" id="youtube"> Enable on YouTube
</label>
</div>
<div class="option">
<label for="google-scholar">
<input type="checkbox" id="google-scholar"> Enable on Google Scholar
</label>
</div>
<div class="option">
<label for="amazon">
<input type="checkbox" id="amazon"> Enable on Amazon
</label>
</div>
<div class="option">
<label for="github">
<input type="checkbox" id="github"> Enable on Github
</label>
</div>
<div class="option">
<label for="gitlab">
<input type="checkbox" id="gitlab"> Enable on Gitlab
</label>
</div>
<div class="option">
<label for="custom-gitlab">
<input type="checkbox" id="custom-gitlab"> Enable on custom Gitlab
</label>
</div>
</section>
<section id="appearance-container">
<h2>Appearance</h2>
<div class="option">
<label for="hide-outline">
<input type="checkbox" id="hide-outline"> Hide outline on selected search result
</label>
</div>
<div class="option">
<h3>EXPERIMENTAL: Custom CSS</h3>
You can set custom CSS rules to change how the focused search results are highlighted. The textarea below contains the default CSS rules.
If you want to reset the CSS to the defaults, set the textarea content to an empty string and save.
<details>
<summary><h3>Edit CSS rules</h3></summary>
<textarea name="custom-css-textarea" id="custom-css-textarea"></textarea>
</details>
</div>
</section>
<section id="advanced-settings-container">
<details>
<summary><h2>Advanced</h2></summary>
<div class="option">
<div class="help">
This option can be used as a workaround for some websites.
</div>
<div id="delay-container">
<label for="delay">
<input type="number" id="delay">Delay extension initialization in milliseconds
</label>
</div>
</div>
<div class="option">
<label for="simulate-middle-click">
<input type="checkbox" id="simulate-middle-click"> Simulate middle click when opening in a new background tab
</label>
</div>
<div class="option">
<h3>Custom Gitlab URL regex</h3>
<div class="help">
Define private Gitlab URL regex. Default is ^https://(www\.)?.*git.*\.
</div>
<div id="custom-gitlab-url-container">
<label for="custom-gitlab-url">
<input type="text" id="custom-gitlab-url">
</label>
</div>
</div>
</details>
</section>
<div id="status"></div>
<div id="buttons-container">
<button id="save">Save</button>
<button id="reset">Reset to defaults</button>
</div>
<script src="browser-polyfill.js"></script>
<script src="options.js"></script>
<script src="options_page.js"></script>
</body>
</html>