File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -287,7 +287,8 @@ section {
287
287
border-radius : 20px ;
288
288
}
289
289
290
- section : target {
290
+ section : target ,
291
+ body : not (body : has (section : target )) # home {
291
292
display : block;
292
293
}
293
294
Original file line number Diff line number Diff line change @@ -331,20 +331,32 @@ class MainBenchmarkClient {
331
331
332
332
_showSection ( hash ) {
333
333
if ( this . _isRunning ) {
334
- window . location . hash = "#running" ;
334
+ this . _setLocationHash ( "#running" ) ;
335
335
return ;
336
336
} else if ( this . _hasResults ) {
337
337
if ( hash !== "#summary" && hash !== "#details" ) {
338
- window . location . hash = "#summary" ;
338
+ this . _setLocationHash ( "#summary" ) ;
339
339
return ;
340
340
}
341
341
} else {
342
- if ( hash !== "#home" && hash !== "#about" ) {
343
- window . location . hash = "#home" ;
342
+ if ( hash !== "" && hash !== " #home" && hash !== "#about" ) {
343
+ this . _setLocationHash ( "#home" ) ;
344
344
return ;
345
345
}
346
346
}
347
- window . location . hash = hash || "#home" ;
347
+ this . _setLocationHash ( hash ) ;
348
+ }
349
+
350
+ _setLocationHash ( hash ) {
351
+ if ( hash === "#home" || hash === "" )
352
+ this . _removeLocationHash ( ) ;
353
+ else
354
+ window . location . hash = hash ;
355
+ }
356
+
357
+ _removeLocationHash ( ) {
358
+ const location = window . location ;
359
+ window . history . pushState ( "" , document . title , location . pathname + location . search ) ;
348
360
}
349
361
}
350
362
You can’t perform that action at this time.
0 commit comments