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