File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 49
49
</ div >
50
50
</ section >
51
51
52
- < section id ="summary ">
52
+ < section id ="summary " data-title =" Results Summary " >
53
53
< a href ="#home " class ="logo ">
54
54
< img srcset ="
resources/[email protected] 2x "
src ="
resources/logo.png "
alt ="
Speedometer "
/>
55
55
< div class ="version "> 3.0</ div >
@@ -69,7 +69,7 @@ <h1>Score</h1>
69
69
</ div >
70
70
</ section >
71
71
72
- < section id ="details ">
72
+ < section id ="details " data-title =" Results Details " >
73
73
< a href ="#home " class ="logo ">
74
74
< img srcset ="
resources/[email protected] 2x "
src ="
resources/logo.png "
alt ="
Speedometer "
/>
75
75
< div class ="version "> 3.0</ div >
@@ -103,7 +103,7 @@ <h2>Detailed Metrics</h2>
103
103
</ div >
104
104
</ section >
105
105
106
- < section id ="about ">
106
+ < section id ="about " data-title =" About " >
107
107
< a href ="#home " class ="logo ">
108
108
< img srcset ="
resources/[email protected] 2x "
src ="
resources/logo.png "
alt ="
Speedometer "
/>
109
109
< div class ="version "> 3.0</ div >
Original file line number Diff line number Diff line change @@ -351,10 +351,18 @@ class MainBenchmarkClient {
351
351
if ( hash === "#home" || hash === "" ) {
352
352
if ( window . location . hash !== hash )
353
353
window . location . hash = "#home" ;
354
+ hash = "#home" ;
354
355
this . _removeLocationHash ( ) ;
355
356
} else {
356
357
window . location . hash = hash ;
357
358
}
359
+ this . _updateDocumentTitle ( hash ) ;
360
+ }
361
+
362
+ _updateDocumentTitle ( hash ) {
363
+ const maybeSection = document . querySelector ( hash ) ;
364
+ const sectionTitle = maybeSection ?. getAttribute ( "data-title" ) ?? "" ;
365
+ document . title = `Speedometer 3 ${ sectionTitle } ` . trimEnd ( ) ;
358
366
}
359
367
360
368
_removeLocationHash ( ) {
You can’t perform that action at this time.
0 commit comments