@prose-reader/enhancer-search 1.38.0 → 1.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.test/coverage/base.css +262 -124
- package/.test/coverage/block-navigation.js +58 -70
- package/.test/coverage/clover.xml +2 -2
- package/.test/coverage/index.html +78 -84
- package/.test/coverage/prettify.css +101 -1
- package/.test/coverage/prettify.js +891 -1
- package/.test/coverage/sorter.js +167 -174
- package/package.json +3 -3
- package/src/index.ts +7 -6
- package/vitest.config.ts +1 -1
package/.test/coverage/base.css
CHANGED
|
@@ -1,71 +1,129 @@
|
|
|
1
|
-
body,
|
|
2
|
-
|
|
1
|
+
body,
|
|
2
|
+
html {
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
3
5
|
height: 100%;
|
|
4
6
|
}
|
|
5
7
|
body {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
font-family:
|
|
9
|
+
Helvetica Neue,
|
|
10
|
+
Helvetica,
|
|
11
|
+
Arial;
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
color: #333;
|
|
14
|
+
}
|
|
15
|
+
.small {
|
|
16
|
+
font-size: 12px;
|
|
17
|
+
}
|
|
18
|
+
*,
|
|
19
|
+
*:after,
|
|
20
|
+
*:before {
|
|
21
|
+
-webkit-box-sizing: border-box;
|
|
22
|
+
-moz-box-sizing: border-box;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
}
|
|
25
|
+
h1 {
|
|
26
|
+
font-size: 20px;
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
h2 {
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
}
|
|
18
32
|
pre {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
.
|
|
33
|
+
font:
|
|
34
|
+
12px/1.4 Consolas,
|
|
35
|
+
"Liberation Mono",
|
|
36
|
+
Menlo,
|
|
37
|
+
Courier,
|
|
38
|
+
monospace;
|
|
39
|
+
margin: 0;
|
|
40
|
+
padding: 0;
|
|
41
|
+
-moz-tab-size: 2;
|
|
42
|
+
-o-tab-size: 2;
|
|
43
|
+
tab-size: 2;
|
|
44
|
+
}
|
|
45
|
+
a {
|
|
46
|
+
color: #0074d9;
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
}
|
|
49
|
+
a:hover {
|
|
50
|
+
text-decoration: underline;
|
|
51
|
+
}
|
|
52
|
+
.strong {
|
|
53
|
+
font-weight: bold;
|
|
54
|
+
}
|
|
55
|
+
.space-top1 {
|
|
56
|
+
padding: 10px 0 0 0;
|
|
57
|
+
}
|
|
58
|
+
.pad2y {
|
|
59
|
+
padding: 20px 0;
|
|
60
|
+
}
|
|
61
|
+
.pad1y {
|
|
62
|
+
padding: 10px 0;
|
|
63
|
+
}
|
|
64
|
+
.pad2x {
|
|
65
|
+
padding: 0 20px;
|
|
66
|
+
}
|
|
67
|
+
.pad2 {
|
|
68
|
+
padding: 20px;
|
|
69
|
+
}
|
|
70
|
+
.pad1 {
|
|
71
|
+
padding: 10px;
|
|
72
|
+
}
|
|
73
|
+
.space-left2 {
|
|
74
|
+
padding-left: 55px;
|
|
75
|
+
}
|
|
76
|
+
.space-right2 {
|
|
77
|
+
padding-right: 20px;
|
|
78
|
+
}
|
|
79
|
+
.center {
|
|
80
|
+
text-align: center;
|
|
81
|
+
}
|
|
82
|
+
.clearfix {
|
|
83
|
+
display: block;
|
|
84
|
+
}
|
|
39
85
|
.clearfix:after {
|
|
40
|
-
content:
|
|
41
|
-
display:block;
|
|
42
|
-
height:0;
|
|
43
|
-
clear:both;
|
|
44
|
-
visibility:hidden;
|
|
86
|
+
content: "";
|
|
87
|
+
display: block;
|
|
88
|
+
height: 0;
|
|
89
|
+
clear: both;
|
|
90
|
+
visibility: hidden;
|
|
91
|
+
}
|
|
92
|
+
.fl {
|
|
93
|
+
float: left;
|
|
94
|
+
}
|
|
95
|
+
@media only screen and (max-width: 640px) {
|
|
96
|
+
.col3 {
|
|
97
|
+
width: 100%;
|
|
98
|
+
max-width: 100%;
|
|
99
|
+
}
|
|
100
|
+
.hide-mobile {
|
|
101
|
+
display: none !important;
|
|
45
102
|
}
|
|
46
|
-
.fl { float: left; }
|
|
47
|
-
@media only screen and (max-width:640px) {
|
|
48
|
-
.col3 { width:100%; max-width:100%; }
|
|
49
|
-
.hide-mobile { display:none!important; }
|
|
50
103
|
}
|
|
51
104
|
|
|
52
105
|
.quiet {
|
|
53
106
|
color: #7f7f7f;
|
|
54
|
-
color: rgba(0,0,0,0.5);
|
|
107
|
+
color: rgba(0, 0, 0, 0.5);
|
|
108
|
+
}
|
|
109
|
+
.quiet a {
|
|
110
|
+
opacity: 0.7;
|
|
55
111
|
}
|
|
56
|
-
.quiet a { opacity: 0.7; }
|
|
57
112
|
|
|
58
113
|
.fraction {
|
|
59
|
-
font-family: Consolas,
|
|
114
|
+
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
60
115
|
font-size: 10px;
|
|
61
116
|
color: #555;
|
|
62
|
-
background: #
|
|
117
|
+
background: #e8e8e8;
|
|
63
118
|
padding: 4px 5px;
|
|
64
119
|
border-radius: 3px;
|
|
65
120
|
vertical-align: middle;
|
|
66
121
|
}
|
|
67
122
|
|
|
68
|
-
div.path a:link,
|
|
123
|
+
div.path a:link,
|
|
124
|
+
div.path a:visited {
|
|
125
|
+
color: #333;
|
|
126
|
+
}
|
|
69
127
|
table.coverage {
|
|
70
128
|
border-collapse: collapse;
|
|
71
129
|
margin: 10px 0 0 0;
|
|
@@ -78,140 +136,219 @@ table.coverage td {
|
|
|
78
136
|
vertical-align: top;
|
|
79
137
|
}
|
|
80
138
|
table.coverage td.line-count {
|
|
81
|
-
|
|
82
|
-
|
|
139
|
+
text-align: right;
|
|
140
|
+
padding: 0 5px 0 20px;
|
|
83
141
|
}
|
|
84
142
|
table.coverage td.line-coverage {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
143
|
+
text-align: right;
|
|
144
|
+
padding-right: 10px;
|
|
145
|
+
min-width: 20px;
|
|
88
146
|
}
|
|
89
147
|
|
|
90
148
|
table.coverage td span.cline-any {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
149
|
+
display: inline-block;
|
|
150
|
+
padding: 0 5px;
|
|
151
|
+
width: 100%;
|
|
94
152
|
}
|
|
95
153
|
.missing-if-branch {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
154
|
+
display: inline-block;
|
|
155
|
+
margin-right: 5px;
|
|
156
|
+
border-radius: 3px;
|
|
157
|
+
position: relative;
|
|
158
|
+
padding: 0 4px;
|
|
159
|
+
background: #333;
|
|
160
|
+
color: yellow;
|
|
103
161
|
}
|
|
104
162
|
|
|
105
163
|
.skip-if-branch {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
164
|
+
display: none;
|
|
165
|
+
margin-right: 10px;
|
|
166
|
+
position: relative;
|
|
167
|
+
padding: 0 4px;
|
|
168
|
+
background: #ccc;
|
|
169
|
+
color: white;
|
|
112
170
|
}
|
|
113
|
-
.missing-if-branch .typ,
|
|
114
|
-
|
|
171
|
+
.missing-if-branch .typ,
|
|
172
|
+
.skip-if-branch .typ {
|
|
173
|
+
color: inherit !important;
|
|
115
174
|
}
|
|
116
175
|
.coverage-summary {
|
|
117
176
|
border-collapse: collapse;
|
|
118
177
|
width: 100%;
|
|
119
178
|
}
|
|
120
|
-
.coverage-summary tr {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
|
|
179
|
+
.coverage-summary tr {
|
|
180
|
+
border-bottom: 1px solid #bbb;
|
|
181
|
+
}
|
|
182
|
+
.keyline-all {
|
|
183
|
+
border: 1px solid #ddd;
|
|
184
|
+
}
|
|
185
|
+
.coverage-summary td,
|
|
186
|
+
.coverage-summary th {
|
|
187
|
+
padding: 10px;
|
|
188
|
+
}
|
|
189
|
+
.coverage-summary tbody {
|
|
190
|
+
border: 1px solid #bbb;
|
|
191
|
+
}
|
|
192
|
+
.coverage-summary td {
|
|
193
|
+
border-right: 1px solid #bbb;
|
|
194
|
+
}
|
|
195
|
+
.coverage-summary td:last-child {
|
|
196
|
+
border-right: none;
|
|
197
|
+
}
|
|
126
198
|
.coverage-summary th {
|
|
127
199
|
text-align: left;
|
|
128
200
|
font-weight: normal;
|
|
129
201
|
white-space: nowrap;
|
|
130
202
|
}
|
|
131
|
-
.coverage-summary th.file {
|
|
132
|
-
|
|
203
|
+
.coverage-summary th.file {
|
|
204
|
+
border-right: none !important;
|
|
205
|
+
}
|
|
206
|
+
.coverage-summary th.pct {
|
|
207
|
+
}
|
|
133
208
|
.coverage-summary th.pic,
|
|
134
209
|
.coverage-summary th.abs,
|
|
135
210
|
.coverage-summary td.pct,
|
|
136
|
-
.coverage-summary td.abs {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
.coverage-summary
|
|
211
|
+
.coverage-summary td.abs {
|
|
212
|
+
text-align: right;
|
|
213
|
+
}
|
|
214
|
+
.coverage-summary td.file {
|
|
215
|
+
white-space: nowrap;
|
|
216
|
+
}
|
|
217
|
+
.coverage-summary td.pic {
|
|
218
|
+
min-width: 120px !important;
|
|
219
|
+
}
|
|
220
|
+
.coverage-summary tfoot td {
|
|
221
|
+
}
|
|
140
222
|
|
|
141
223
|
.coverage-summary .sorter {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
224
|
+
height: 10px;
|
|
225
|
+
width: 7px;
|
|
226
|
+
display: inline-block;
|
|
227
|
+
margin-left: 0.5em;
|
|
228
|
+
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
147
229
|
}
|
|
148
230
|
.coverage-summary .sorted .sorter {
|
|
149
|
-
|
|
231
|
+
background-position: 0 -20px;
|
|
150
232
|
}
|
|
151
233
|
.coverage-summary .sorted-desc .sorter {
|
|
152
|
-
|
|
234
|
+
background-position: 0 -10px;
|
|
235
|
+
}
|
|
236
|
+
.status-line {
|
|
237
|
+
height: 10px;
|
|
153
238
|
}
|
|
154
|
-
.status-line { height: 10px; }
|
|
155
239
|
/* yellow */
|
|
156
|
-
.cbranch-no {
|
|
240
|
+
.cbranch-no {
|
|
241
|
+
background: yellow !important;
|
|
242
|
+
color: #111;
|
|
243
|
+
}
|
|
157
244
|
/* dark red */
|
|
158
|
-
.red.solid,
|
|
159
|
-
.low
|
|
245
|
+
.red.solid,
|
|
246
|
+
.status-line.low,
|
|
247
|
+
.low .cover-fill {
|
|
248
|
+
background: #c21f39;
|
|
249
|
+
}
|
|
250
|
+
.low .chart {
|
|
251
|
+
border: 1px solid #c21f39;
|
|
252
|
+
}
|
|
160
253
|
.highlighted,
|
|
161
|
-
.highlighted .cstat-no,
|
|
162
|
-
|
|
254
|
+
.highlighted .cstat-no,
|
|
255
|
+
.highlighted .fstat-no,
|
|
256
|
+
.highlighted .cbranch-no {
|
|
257
|
+
background: #c21f39 !important;
|
|
163
258
|
}
|
|
164
259
|
/* medium red */
|
|
165
|
-
.cstat-no,
|
|
260
|
+
.cstat-no,
|
|
261
|
+
.fstat-no,
|
|
262
|
+
.cbranch-no,
|
|
263
|
+
.cbranch-no {
|
|
264
|
+
background: #f6c6ce;
|
|
265
|
+
}
|
|
166
266
|
/* light red */
|
|
167
|
-
.low,
|
|
267
|
+
.low,
|
|
268
|
+
.cline-no {
|
|
269
|
+
background: #fce1e5;
|
|
270
|
+
}
|
|
168
271
|
/* light green */
|
|
169
|
-
.high,
|
|
272
|
+
.high,
|
|
273
|
+
.cline-yes {
|
|
274
|
+
background: rgb(230, 245, 208);
|
|
275
|
+
}
|
|
170
276
|
/* medium green */
|
|
171
|
-
.cstat-yes {
|
|
277
|
+
.cstat-yes {
|
|
278
|
+
background: rgb(161, 215, 106);
|
|
279
|
+
}
|
|
172
280
|
/* dark green */
|
|
173
|
-
.status-line.high,
|
|
174
|
-
.high .
|
|
281
|
+
.status-line.high,
|
|
282
|
+
.high .cover-fill {
|
|
283
|
+
background: rgb(77, 146, 33);
|
|
284
|
+
}
|
|
285
|
+
.high .chart {
|
|
286
|
+
border: 1px solid rgb(77, 146, 33);
|
|
287
|
+
}
|
|
175
288
|
/* dark yellow (gold) */
|
|
176
|
-
.status-line.medium,
|
|
177
|
-
.medium .
|
|
289
|
+
.status-line.medium,
|
|
290
|
+
.medium .cover-fill {
|
|
291
|
+
background: #f9cd0b;
|
|
292
|
+
}
|
|
293
|
+
.medium .chart {
|
|
294
|
+
border: 1px solid #f9cd0b;
|
|
295
|
+
}
|
|
178
296
|
/* light yellow */
|
|
179
|
-
.medium {
|
|
297
|
+
.medium {
|
|
298
|
+
background: #fff4c2;
|
|
299
|
+
}
|
|
180
300
|
|
|
181
|
-
.cstat-skip {
|
|
182
|
-
|
|
183
|
-
|
|
301
|
+
.cstat-skip {
|
|
302
|
+
background: #ddd;
|
|
303
|
+
color: #111;
|
|
304
|
+
}
|
|
305
|
+
.fstat-skip {
|
|
306
|
+
background: #ddd;
|
|
307
|
+
color: #111 !important;
|
|
308
|
+
}
|
|
309
|
+
.cbranch-skip {
|
|
310
|
+
background: #ddd !important;
|
|
311
|
+
color: #111;
|
|
312
|
+
}
|
|
184
313
|
|
|
185
|
-
span.cline-neutral {
|
|
314
|
+
span.cline-neutral {
|
|
315
|
+
background: #eaeaea;
|
|
316
|
+
}
|
|
186
317
|
|
|
187
318
|
.coverage-summary td.empty {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
319
|
+
opacity: 0.5;
|
|
320
|
+
padding-top: 4px;
|
|
321
|
+
padding-bottom: 4px;
|
|
322
|
+
line-height: 1;
|
|
323
|
+
color: #888;
|
|
193
324
|
}
|
|
194
325
|
|
|
195
|
-
.cover-fill,
|
|
196
|
-
|
|
326
|
+
.cover-fill,
|
|
327
|
+
.cover-empty {
|
|
328
|
+
display: inline-block;
|
|
197
329
|
height: 12px;
|
|
198
330
|
}
|
|
199
331
|
.chart {
|
|
200
332
|
line-height: 0;
|
|
201
333
|
}
|
|
202
334
|
.cover-empty {
|
|
203
|
-
|
|
335
|
+
background: white;
|
|
204
336
|
}
|
|
205
337
|
.cover-full {
|
|
206
|
-
|
|
338
|
+
border-right: none !important;
|
|
207
339
|
}
|
|
208
340
|
pre.prettyprint {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
341
|
+
border: none !important;
|
|
342
|
+
padding: 0 !important;
|
|
343
|
+
margin: 0 !important;
|
|
344
|
+
}
|
|
345
|
+
.com {
|
|
346
|
+
color: #999 !important;
|
|
347
|
+
}
|
|
348
|
+
.ignore-none {
|
|
349
|
+
color: #999;
|
|
350
|
+
font-weight: normal;
|
|
212
351
|
}
|
|
213
|
-
.com { color: #999 !important; }
|
|
214
|
-
.ignore-none { color: #999; font-weight: normal; }
|
|
215
352
|
|
|
216
353
|
.wrapper {
|
|
217
354
|
min-height: 100%;
|
|
@@ -219,6 +356,7 @@ pre.prettyprint {
|
|
|
219
356
|
height: 100%;
|
|
220
357
|
margin: 0 auto -48px;
|
|
221
358
|
}
|
|
222
|
-
.footer,
|
|
359
|
+
.footer,
|
|
360
|
+
.push {
|
|
223
361
|
height: 48px;
|
|
224
362
|
}
|
|
@@ -1,87 +1,75 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
var jumpToCode = (function init() {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
// Classes of code we would like to highlight in the file view
|
|
4
|
+
var missingCoverageClasses = [".cbranch-no", ".cstat-no", ".fstat-no"]
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
// Elements to highlight in the file listing view
|
|
7
|
+
var fileListingElements = ["td.pct.low"]
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
// We don't want to select elements that are direct descendants of another match
|
|
10
|
+
var notSelector = ":not(" + missingCoverageClasses.join("):not(") + ") > " // becomes `:not(a):not(b) > `
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fileListingElements.join(', ') +
|
|
15
|
-
', ' +
|
|
16
|
-
notSelector +
|
|
17
|
-
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
12
|
+
// Selecter that finds elements on the page to which we can jump
|
|
13
|
+
var selector = fileListingElements.join(", ") + ", " + notSelector + missingCoverageClasses.join(", " + notSelector) // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
// The NodeList of matching elements
|
|
16
|
+
var missingCoverageElements = document.querySelectorAll(selector)
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
var currentIndex
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
missingCoverageElements.item(index).classList.add('highlighted');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function makeCurrent(index) {
|
|
32
|
-
toggleClass(index);
|
|
33
|
-
currentIndex = index;
|
|
34
|
-
missingCoverageElements.item(index).scrollIntoView({
|
|
35
|
-
behavior: 'smooth',
|
|
36
|
-
block: 'center',
|
|
37
|
-
inline: 'center'
|
|
38
|
-
});
|
|
39
|
-
}
|
|
20
|
+
function toggleClass(index) {
|
|
21
|
+
missingCoverageElements.item(currentIndex).classList.remove("highlighted")
|
|
22
|
+
missingCoverageElements.item(index).classList.add("highlighted")
|
|
23
|
+
}
|
|
40
24
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
25
|
+
function makeCurrent(index) {
|
|
26
|
+
toggleClass(index)
|
|
27
|
+
currentIndex = index
|
|
28
|
+
missingCoverageElements.item(index).scrollIntoView({
|
|
29
|
+
behavior: "smooth",
|
|
30
|
+
block: "center",
|
|
31
|
+
inline: "center",
|
|
32
|
+
})
|
|
33
|
+
}
|
|
48
34
|
|
|
49
|
-
|
|
35
|
+
function goToPrevious() {
|
|
36
|
+
var nextIndex = 0
|
|
37
|
+
if (typeof currentIndex !== "number" || currentIndex === 0) {
|
|
38
|
+
nextIndex = missingCoverageElements.length - 1
|
|
39
|
+
} else if (missingCoverageElements.length > 1) {
|
|
40
|
+
nextIndex = currentIndex - 1
|
|
50
41
|
}
|
|
51
42
|
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
makeCurrent(nextIndex)
|
|
44
|
+
}
|
|
54
45
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
currentIndex < missingCoverageElements.length - 1
|
|
58
|
-
) {
|
|
59
|
-
nextIndex = currentIndex + 1;
|
|
60
|
-
}
|
|
46
|
+
function goToNext() {
|
|
47
|
+
var nextIndex = 0
|
|
61
48
|
|
|
62
|
-
|
|
49
|
+
if (typeof currentIndex === "number" && currentIndex < missingCoverageElements.length - 1) {
|
|
50
|
+
nextIndex = currentIndex + 1
|
|
63
51
|
}
|
|
64
52
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
document.getElementById('fileSearch') === document.activeElement &&
|
|
68
|
-
document.activeElement != null
|
|
69
|
-
) {
|
|
70
|
-
// if we're currently focused on the search input, we don't want to navigate
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
53
|
+
makeCurrent(nextIndex)
|
|
54
|
+
}
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
56
|
+
return function jump(event) {
|
|
57
|
+
if (document.getElementById("fileSearch") === document.activeElement && document.activeElement != null) {
|
|
58
|
+
// if we're currently focused on the search input, we don't want to navigate
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
switch (event.which) {
|
|
63
|
+
case 78: // n
|
|
64
|
+
case 74: // j
|
|
65
|
+
goToNext()
|
|
66
|
+
break
|
|
67
|
+
case 66: // b
|
|
68
|
+
case 75: // k
|
|
69
|
+
case 80: // p
|
|
70
|
+
goToPrevious()
|
|
71
|
+
break
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
})()
|
|
75
|
+
window.addEventListener("keydown", jumpToCode)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1678433386213" clover="3.2.0">
|
|
3
|
+
<project timestamp="1678433386213" name="All files">
|
|
4
4
|
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="0" coveredelements="0" complexity="0" loc="0" ncloc="0" packages="0" files="0" classes="0"/>
|
|
5
5
|
</project>
|
|
6
6
|
</coverage>
|