hookapp 0.0.7 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +14 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +2 -2
  6. data/LICENSE.md +31 -0
  7. data/OVERVIEW.md +80 -0
  8. data/README.md +282 -21
  9. data/Rakefile +1 -1
  10. data/bin/hook +127 -10
  11. data/buildnotes.md +29 -0
  12. data/hook.rdoc +63 -4
  13. data/hookapp.gemspec +9 -8
  14. data/html/App.html +119 -0
  15. data/html/GLI.html +99 -0
  16. data/html/GLI/Commands.html +99 -0
  17. data/html/GLI/Commands/Doc.html +99 -0
  18. data/html/GLI/Commands/MarkdownDocumentListener.html +717 -0
  19. data/html/Hook.html +113 -0
  20. data/html/HookApp.html +1222 -0
  21. data/html/Hooker.html +119 -0
  22. data/html/README_rdoc.html +328 -0
  23. data/html/String.html +427 -0
  24. data/html/created.rid +9 -0
  25. data/html/css/fonts.css +167 -0
  26. data/html/css/rdoc.css +619 -0
  27. data/html/fonts/Lato-Light.ttf +0 -0
  28. data/html/fonts/Lato-LightItalic.ttf +0 -0
  29. data/html/fonts/Lato-Regular.ttf +0 -0
  30. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  31. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  32. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  33. data/html/images/add.png +0 -0
  34. data/html/images/arrow_up.png +0 -0
  35. data/html/images/brick.png +0 -0
  36. data/html/images/brick_link.png +0 -0
  37. data/html/images/bug.png +0 -0
  38. data/html/images/bullet_black.png +0 -0
  39. data/html/images/bullet_toggle_minus.png +0 -0
  40. data/html/images/bullet_toggle_plus.png +0 -0
  41. data/html/images/date.png +0 -0
  42. data/html/images/delete.png +0 -0
  43. data/html/images/find.png +0 -0
  44. data/html/images/loadingAnimation.gif +0 -0
  45. data/html/images/macFFBgHack.png +0 -0
  46. data/html/images/package.png +0 -0
  47. data/html/images/page_green.png +0 -0
  48. data/html/images/page_white_text.png +0 -0
  49. data/html/images/page_white_width.png +0 -0
  50. data/html/images/plugin.png +0 -0
  51. data/html/images/ruby.png +0 -0
  52. data/html/images/tag_blue.png +0 -0
  53. data/html/images/tag_green.png +0 -0
  54. data/html/images/transparent.png +0 -0
  55. data/html/images/wrench.png +0 -0
  56. data/html/images/wrench_orange.png +0 -0
  57. data/html/images/zoom.png +0 -0
  58. data/html/index.html +308 -0
  59. data/html/js/darkfish.js +84 -0
  60. data/html/js/navigation.js +105 -0
  61. data/html/js/navigation.js.gz +0 -0
  62. data/html/js/search.js +110 -0
  63. data/html/js/search_index.js +1 -0
  64. data/html/js/search_index.js.gz +0 -0
  65. data/html/js/searcher.js +229 -0
  66. data/html/js/searcher.js.gz +0 -0
  67. data/html/table_of_contents.html +409 -0
  68. data/lib/completion/hook_completion.bash +22 -0
  69. data/lib/completion/hook_completion.fish +31 -0
  70. data/lib/completion/hook_completion.zsh +22 -0
  71. data/lib/helpers/fuzzyfilefinder +0 -0
  72. data/lib/hook.rb +5 -1
  73. data/lib/hook/hookapp.rb +489 -0
  74. data/lib/hook/hooker.rb +1 -344
  75. data/lib/hook/markdown_document_listener.rb +164 -0
  76. data/lib/hook/string.rb +60 -0
  77. data/lib/hook/version.rb +3 -1
  78. metadata +76 -12
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,308 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>hookapp</title>
8
+
9
+ <script type="text/javascript">
10
+ var rdoc_rel_prefix = "./";
11
+ var index_rel_prefix = "./";
12
+ </script>
13
+
14
+ <script src="./js/navigation.js" defer></script>
15
+ <script src="./js/search.js" defer></script>
16
+ <script src="./js/search_index.js" defer></script>
17
+ <script src="./js/searcher.js" defer></script>
18
+ <script src="./js/darkfish.js" defer></script>
19
+
20
+ <link href="./css/fonts.css" rel="stylesheet">
21
+ <link href="./css/rdoc.css" rel="stylesheet">
22
+
23
+
24
+
25
+
26
+ <body id="top" role="document" class="file">
27
+ <nav role="navigation">
28
+ <div id="project-navigation">
29
+ <div id="home-section" role="region" title="Quick navigation" class="nav-section">
30
+ <h2>
31
+ <a href="./index.html" rel="home">Home</a>
32
+ </h2>
33
+
34
+ <div id="table-of-contents-navigation">
35
+ <a href="./table_of_contents.html#pages">Pages</a>
36
+ <a href="./table_of_contents.html#classes">Classes</a>
37
+ <a href="./table_of_contents.html#methods">Methods</a>
38
+ </div>
39
+ </div>
40
+
41
+
42
+ <div id="search-section" role="search" class="project-section initially-hidden">
43
+ <form action="#" method="get" accept-charset="utf-8">
44
+ <div id="search-field-wrapper">
45
+ <input id="search-field" role="combobox" aria-label="Search"
46
+ aria-autocomplete="list" aria-controls="search-results"
47
+ type="text" name="search" placeholder="Search" spellcheck="false"
48
+ title="Type to search, Up and Down to navigate, Enter to load">
49
+ </div>
50
+
51
+ <ul id="search-results" aria-label="Search Results"
52
+ aria-busy="false" aria-expanded="false"
53
+ aria-atomic="false" class="initially-hidden"></ul>
54
+ </form>
55
+ </div>
56
+
57
+ </div>
58
+
59
+ <div id="project-metadata">
60
+ <div id="fileindex-section" class="nav-section">
61
+ <h3>Pages</h3>
62
+
63
+ <ul class="link-list">
64
+
65
+ <li><a href="./README_rdoc.html">README</a>
66
+
67
+ </ul>
68
+ </div>
69
+
70
+ <div id="classindex-section" class="nav-section">
71
+ <h3>Class and Module Index</h3>
72
+
73
+ <ul class="link-list">
74
+
75
+ <li><a href="./App.html">App</a>
76
+
77
+ <li><a href="./GLI.html">GLI</a>
78
+
79
+ <li><a href="./GLI/Commands.html">GLI::Commands</a>
80
+
81
+ <li><a href="./GLI/Commands/Doc.html">GLI::Commands::Doc</a>
82
+
83
+ <li><a href="./GLI/Commands/MarkdownDocumentListener.html">GLI::Commands::MarkdownDocumentListener</a>
84
+
85
+ <li><a href="./Hook.html">Hook</a>
86
+
87
+ <li><a href="./HookApp.html">HookApp</a>
88
+
89
+ <li><a href="./Hooker.html">Hooker</a>
90
+
91
+ <li><a href="./String.html">String</a>
92
+
93
+ </ul>
94
+ </div>
95
+
96
+ </div>
97
+ </nav>
98
+
99
+ <main role="main">
100
+
101
+
102
+ <h1 id="label-hookapp">hookapp<span><a href="#label-hookapp">&para;</a> <a href="#top">&uarr;</a></span></h1>
103
+
104
+ <p>A CLI for Hook.app on macOS.</p>
105
+
106
+ <h2 id="label-hook+-+CLI+interface+for+Hook.app+-28macOS-29">hook - CLI interface for Hook.app (macOS)<span><a href="#label-hook+-+CLI+interface+for+Hook.app+-28macOS-29">&para;</a> <a href="#top">&uarr;</a></span></h2>
107
+
108
+ <p>Hook.app is a productivity tool for macOS &lt;<a href="https://hookproductivity.com">hookproductivity.com</a>/&gt;. This gem includes a `hook` binary that allows interaction with the features of Hook.app.</p>
109
+
110
+ <p>v2.0.3</p>
111
+
112
+ <h3 id="label-Global+Options">Global Options<span><a href="#label-Global+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
113
+
114
+ <h3 id="label--help">–help<span><a href="#label--help">&para;</a> <a href="#top">&uarr;</a></span></h3>
115
+
116
+ <p>Show this message</p>
117
+
118
+ <h3 id="label--version">–version<span><a href="#label--version">&para;</a> <a href="#top">&uarr;</a></span></h3>
119
+
120
+ <p>Display the program version</p>
121
+
122
+ <h3 id="label-Commands">Commands<span><a href="#label-Commands">&para;</a> <a href="#top">&uarr;</a></span></h3>
123
+
124
+ <h4 id="label-Command-3A+clip-7Ccp++FILE_OR_URL">Command: <code>clip|cp FILE_OR_URL</code><span><a href="#label-Command-3A+clip-7Ccp++FILE_OR_URL">&para;</a> <a href="#top">&uarr;</a></span></h4>
125
+
126
+ <p>Copy <a href="Hook.html"><code>Hook</code></a> URL for file/url to clipboard</p>
127
+
128
+ <p>Creates a bookmark for the specified file or URL and copies its <a href="Hook.html"><code>Hook</code></a> URL to the clipboard.</p>
129
+
130
+ <p>The copied <a href="Hook.html"><code>Hook</code></a> URL can be used to link to other files (use `hook link –paste FILE/URL), or to paste into another app as a link. Use the -m flag to copy a full Markdown link.</p>
131
+
132
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
133
+
134
+ <h5 id="label-a-7C--app+APP_NAME">-a|–app APP_NAME<span><a href="#label-a-7C--app+APP_NAME">&para;</a> <a href="#top">&uarr;</a></span></h5>
135
+
136
+ <p>Copy from application</p>
137
+ <dl class="rdoc-list label-list"><dt>Default Value
138
+ <dd>
139
+ <p>None</p>
140
+ </dd></dl>
141
+
142
+ <h5 id="label-m-7C--markdown">-m|–markdown<span><a href="#label-m-7C--markdown">&para;</a> <a href="#top">&uarr;</a></span></h5>
143
+
144
+ <p>Copy as Markdown</p>
145
+
146
+ <h4 id="label-Command-3A+clone++SOURCE+TARGET">Command: <code>clone SOURCE TARGET</code><span><a href="#label-Command-3A+clone++SOURCE+TARGET">&para;</a> <a href="#top">&uarr;</a></span></h4>
147
+
148
+ <p>Clone all hooks from one file or url onto another</p>
149
+
150
+ <p>Copy all the files and urls that the first file is hooked to onto another file. Exactly two arguments (SOURCE, TARGET) required.</p>
151
+
152
+ <h4 id="label-Command-3A+find-7Csearch++SEARCH_STRING">Command: <code>find|search SEARCH_STRING</code><span><a href="#label-Command-3A+find-7Csearch++SEARCH_STRING">&para;</a> <a href="#top">&uarr;</a></span></h4>
153
+
154
+ <p>Search bookmarks</p>
155
+
156
+ <p>Search bookmark urls and names for a string and output in specified format (default “paths”).</p>
157
+
158
+ <p>Run `hook find` with no search argument to list all bookmarks.</p>
159
+
160
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
161
+
162
+ <h5 id="label-o-7C--output_format+format">-o|–output_format format<span><a href="#label-o-7C--output_format+format">&para;</a> <a href="#top">&uarr;</a></span></h5>
163
+
164
+ <p>Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]</p>
165
+ <dl class="rdoc-list label-list"><dt>Default Value
166
+ <dd>
167
+ <p>paths</p>
168
+ </dd></dl>
169
+
170
+ <h5 id="label-f-7C--files_only">-f|–files_only<span><a href="#label-f-7C--files_only">&para;</a> <a href="#top">&uarr;</a></span></h5>
171
+
172
+ <p>Output only bookmarks with file paths (exclude e.g. emails)</p>
173
+
174
+ <h5 id="label-n-7C--names_only">-n|–names_only<span><a href="#label-n-7C--names_only">&para;</a> <a href="#top">&uarr;</a></span></h5>
175
+
176
+ <p>Search only bookmark names</p>
177
+
178
+ <h5 id="label--null">–null<span><a href="#label--null">&para;</a> <a href="#top">&uarr;</a></span></h5>
179
+
180
+ <p>Separate results with NULL separator, only applies with “paths” output for single file argument</p>
181
+
182
+ <h4 id="label-Command-3A+from++APPLICATION_NAME">Command: <code>from APPLICATION_NAME</code><span><a href="#label-Command-3A+from++APPLICATION_NAME">&para;</a> <a href="#top">&uarr;</a></span></h4>
183
+
184
+ <p>Get a <a href="Hook.html"><code>Hook</code></a> URL for the frontmost window of an app</p>
185
+
186
+ <p>Specify an application by name (without &#39;.app&#39;) to bring that app to the foreground and create a bookmark for the active document, note, task, etc., returning a <a href="Hook.html"><code>Hook</code></a> URL.</p>
187
+
188
+ <p>Use -m to get the response as Markdown, and/or -c to copy the result directly to the clipboard.</p>
189
+
190
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
191
+
192
+ <h5 id="label-c-7C--copy">-c|–copy<span><a href="#label-c-7C--copy">&para;</a> <a href="#top">&uarr;</a></span></h5>
193
+
194
+ <p>Copy to clipboard</p>
195
+
196
+ <h5 id="label-m-7C--markdown">-m|–markdown<span><a href="#label-m-7C--markdown">&para;</a> <a href="#top">&uarr;</a></span></h5>
197
+
198
+ <p>Output as Markdown</p>
199
+
200
+ <h4 id="label-Command-3A+help++command">Command: <code>help command</code><span><a href="#label-Command-3A+help++command">&para;</a> <a href="#top">&uarr;</a></span></h4>
201
+
202
+ <p>Shows a list of commands or help for one command</p>
203
+
204
+ <p>Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function</p>
205
+
206
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
207
+
208
+ <h5 id="label-c">-c<span><a href="#label-c">&para;</a> <a href="#top">&uarr;</a></span></h5>
209
+
210
+ <p>List commands one per line, to assist with shell completion</p>
211
+
212
+ <h4 id="label-Command-3A+link-7Cln++SOURCE+-5BSOURCE...-5D+TARGET">Command: <code>link|ln SOURCE [SOURCE...] TARGET</code><span><a href="#label-Command-3A+link-7Cln++SOURCE+-5BSOURCE...-5D+TARGET">&para;</a> <a href="#top">&uarr;</a></span></h4>
213
+
214
+ <p>Create bidirectional hooks between two or more files/urls</p>
215
+
216
+ <p>If two files/urls are provided, links will be bi-directional. If three or more are provided, `link` defaults to creating bi-directional links between each file and the last file in the list. Use `-a` to create bi-directional links between every file in the list.</p>
217
+
218
+ <p>If using `–paste`, the URL/hook link in the clipboard will be used as one argument, to be combined with one or more file/url arguments.</p>
219
+
220
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
221
+
222
+ <h5 id="label-a-7C--all">-a|–all<span><a href="#label-a-7C--all">&para;</a> <a href="#top">&uarr;</a></span></h5>
223
+
224
+ <p>Link every listed file or url to every other</p>
225
+
226
+ <h5 id="label-p-7C--paste">-p|–paste<span><a href="#label-p-7C--paste">&para;</a> <a href="#top">&uarr;</a></span></h5>
227
+
228
+ <p>Paste URL from clipboard</p>
229
+
230
+ <h4 id="label-Command-3A+list-7Cls++FILE_OR_URL+-5BFILE_OR_URL...-5D">Command: <code>list|ls FILE_OR_URL [FILE_OR_URL...]</code><span><a href="#label-Command-3A+list-7Cls++FILE_OR_URL+-5BFILE_OR_URL...-5D">&para;</a> <a href="#top">&uarr;</a></span></h4>
231
+
232
+ <p>List hooks on a file or url</p>
233
+
234
+ <p>Output a list of all hooks attached to given url(s) or file(s) in the specified format (default “paths”).</p>
235
+
236
+ <p>Run `hook list` with no file/url argument to list all bookmarks.</p>
237
+
238
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
239
+
240
+ <h5 id="label-o-7C--output_format+format">-o|–output_format format<span><a href="#label-o-7C--output_format+format">&para;</a> <a href="#top">&uarr;</a></span></h5>
241
+
242
+ <p>Output format [(h)ooks, (p)aths, (m)arkdown, (v)erbose]</p>
243
+ <dl class="rdoc-list label-list"><dt>Default Value
244
+ <dd>
245
+ <p>paths</p>
246
+ </dd></dl>
247
+
248
+ <h5 id="label-f-7C--files_only">-f|–files_only<span><a href="#label-f-7C--files_only">&para;</a> <a href="#top">&uarr;</a></span></h5>
249
+
250
+ <p>Output only bookmarks with file paths (exclude e.g. emails)</p>
251
+
252
+ <h5 id="label--null">–null<span><a href="#label--null">&para;</a> <a href="#top">&uarr;</a></span></h5>
253
+
254
+ <p>Separate results with NULL separator, only applies with “paths” output for single file argument</p>
255
+
256
+ <h5 id="label-s-7C--select">-<a href="no-">s|–</a>select<span><a href="#label-s-7C--select">&para;</a> <a href="#top">&uarr;</a></span></h5>
257
+
258
+ <p>Generate a menu to select hook(s) for opening</p>
259
+
260
+ <p>This option is a shortcut to `hook select` and overrides any other arguments.</p>
261
+
262
+ <h4 id="label-Command-3A+open-7Cgui++FILE_OR_URL">Command: <code>open|gui FILE_OR_URL</code><span><a href="#label-Command-3A+open-7Cgui++FILE_OR_URL">&para;</a> <a href="#top">&uarr;</a></span></h4>
263
+
264
+ <p>Open the specified file or url in <a href="Hook.html"><code>Hook</code></a> GUI</p>
265
+
266
+ <p>Opens Hook.app on the specified file/URL for browsing and performing actions. Exactly one argument (File/URL) required.</p>
267
+
268
+ <h4 id="label-Command-3A+remove-7Crm++ITEM_1+ITEM_2">Command: <code>remove|rm ITEM_1 ITEM_2</code><span><a href="#label-Command-3A+remove-7Crm++ITEM_1+ITEM_2">&para;</a> <a href="#top">&uarr;</a></span></h4>
269
+
270
+ <p>Remove a hook between two files/urls</p>
271
+
272
+ <p>Remove a hook between two files or URLs. If you use –all, all hooks on a given file will be removed.</p>
273
+
274
+ <p>If –all isn&#39;t specified, exactly two arguments (Files/URLs) are required.</p>
275
+
276
+ <h5 id="label-Options">Options<span><a href="#label-Options">&para;</a> <a href="#top">&uarr;</a></span></h5>
277
+
278
+ <h5 id="label-a-7C--all">-a|–all<span><a href="#label-a-7C--all">&para;</a> <a href="#top">&uarr;</a></span></h5>
279
+
280
+ <p>Remove ALL links on files, requires confirmation</p>
281
+
282
+ <h4 id="label-Command-3A+scripts++SHELL">Command: <code>scripts SHELL</code><span><a href="#label-Command-3A+scripts++SHELL">&para;</a> <a href="#top">&uarr;</a></span></h4>
283
+
284
+ <p>Shell completion examples</p>
285
+
286
+ <p>Output completion script example for the specified shell (bash, zsh, fish)</p>
287
+
288
+ <h4 id="label-Command-3A+select++FILE_OR_URL">Command: <code>select FILE_OR_URL</code><span><a href="#label-Command-3A+select++FILE_OR_URL">&para;</a> <a href="#top">&uarr;</a></span></h4>
289
+
290
+ <p>Select from hooks on a file/url and open in default application</p>
291
+
292
+ <p>If the target file/URL has hooked items, a menu will be provided. Selecting one or more files from this menu will open the item(s) using the default application assigned to the filetype by macOS. Allows multiple selections with tab key, and type-ahead fuzzy filtering of results.</p>
293
+ <dl class="rdoc-list label-list"><dt>Default Command
294
+ <dd>
295
+ <p>help</p>
296
+ </dd></dl>
297
+
298
+
299
+ </main>
300
+
301
+
302
+
303
+ <footer id="validator-badges" role="contentinfo">
304
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
305
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
306
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
307
+ </footer>
308
+
@@ -0,0 +1,84 @@
1
+ /**
2
+ *
3
+ * Darkfish Page Functions
4
+ * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
5
+ *
6
+ * Author: Michael Granger <mgranger@laika.com>
7
+ *
8
+ */
9
+
10
+ /* Provide console simulation for firebug-less environments */
11
+ /*
12
+ if (!("console" in window) || !("firebug" in console)) {
13
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
14
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
15
+
16
+ window.console = {};
17
+ for (var i = 0; i < names.length; ++i)
18
+ window.console[names[i]] = function() {};
19
+ };
20
+ */
21
+
22
+
23
+ function showSource( e ) {
24
+ var target = e.target;
25
+ while (!target.classList.contains('method-detail')) {
26
+ target = target.parentNode;
27
+ }
28
+ if (typeof target !== "undefined" && target !== null) {
29
+ target = target.querySelector('.method-source-code');
30
+ }
31
+ if (typeof target !== "undefined" && target !== null) {
32
+ target.classList.toggle('active-menu')
33
+ }
34
+ };
35
+
36
+ function hookSourceViews() {
37
+ document.querySelectorAll('.method-heading').forEach(function (codeObject) {
38
+ codeObject.addEventListener('click', showSource);
39
+ });
40
+ };
41
+
42
+ function hookSearch() {
43
+ var input = document.querySelector('#search-field');
44
+ var result = document.querySelector('#search-results');
45
+ result.classList.remove("initially-hidden");
46
+
47
+ var search_section = document.querySelector('#search-section');
48
+ search_section.classList.remove("initially-hidden");
49
+
50
+ var search = new Search(search_data, input, result);
51
+
52
+ search.renderItem = function(result) {
53
+ var li = document.createElement('li');
54
+ var html = '';
55
+
56
+ // TODO add relative path to <script> per-page
57
+ html += '<p class="search-match"><a href="' + index_rel_prefix + result.path + '">' + this.hlt(result.title);
58
+ if (result.params)
59
+ html += '<span class="params">' + result.params + '</span>';
60
+ html += '</a>';
61
+
62
+
63
+ if (result.namespace)
64
+ html += '<p class="search-namespace">' + this.hlt(result.namespace);
65
+
66
+ if (result.snippet)
67
+ html += '<div class="search-snippet">' + result.snippet + '</div>';
68
+
69
+ li.innerHTML = html;
70
+
71
+ return li;
72
+ }
73
+
74
+ search.select = function(result) {
75
+ window.location.href = result.firstChild.firstChild.href;
76
+ }
77
+
78
+ search.scrollIntoView = search.scrollInWindow;
79
+ };
80
+
81
+ document.addEventListener('DOMContentLoaded', function() {
82
+ hookSourceViews();
83
+ hookSearch();
84
+ });