File tree 1 file changed +12
-2
lines changed
devops/scripts/benchmarks/html
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -475,8 +475,17 @@ function updateURL() {
475
475
}
476
476
477
477
// Add toggle states to URL
478
- url . searchParams . set ( 'notes' , isNotesEnabled ( ) ) ;
479
- url . searchParams . set ( 'unstable' , isUnstableEnabled ( ) ) ;
478
+ if ( isNotesEnabled ( ) ) {
479
+ url . searchParams . delete ( 'notes' ) ;
480
+ } else {
481
+ url . searchParams . set ( 'notes' , 'false' ) ;
482
+ }
483
+
484
+ if ( ! isUnstableEnabled ( ) ) {
485
+ url . searchParams . delete ( 'unstable' ) ;
486
+ } else {
487
+ url . searchParams . set ( 'unstable' , 'true' ) ;
488
+ }
480
489
481
490
history . replaceState ( null , '' , url ) ;
482
491
}
@@ -754,6 +763,7 @@ function setupToggles() {
754
763
document . querySelectorAll ( '.benchmark-note' ) . forEach ( note => {
755
764
note . style . display = isNotesEnabled ( ) ? 'block' : 'none' ;
756
765
} ) ;
766
+ updateURL ( ) ;
757
767
} ) ;
758
768
759
769
unstableToggle . addEventListener ( 'change' , function ( ) {
You can’t perform that action at this time.
0 commit comments