File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
src/librustdoc/html/static/js Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change @@ -504,29 +504,6 @@ function hideThemeButtonState() {
504504 document . addEventListener ( "keypress" , handleShortcut ) ;
505505 document . addEventListener ( "keydown" , handleShortcut ) ;
506506
507- ( function ( ) {
508- const x = document . getElementsByClassName ( "version-selector" ) ;
509- if ( x . length > 0 ) {
510- x [ 0 ] . onchange = function ( ) {
511- let url = document . location . href , stripped = "" ;
512- const len = window . rootPath . match ( / \. \. \/ / g) . length + 1 ;
513-
514- for ( let i = 0 ; i < len ; ++ i ) {
515- const match = url . match ( / \/ [ ^ / ] * $ / ) ;
516- if ( i < len - 1 ) {
517- stripped = match [ 0 ] + stripped ;
518- }
519- url = url . substring ( 0 , url . length - match [ 0 ] . length ) ;
520- }
521-
522- const selectedVersion = document . getElementsByClassName ( "version-selector" ) [ 0 ] . value ;
523- url += "/" + selectedVersion + stripped ;
524-
525- document . location . href = url ;
526- } ;
527- }
528- } ( ) ) ;
529-
530507 // delayed sidebar rendering.
531508 window . initSidebarItems = function ( items ) {
532509 const sidebar = document . getElementsByClassName ( "sidebar-elems" ) [ 0 ] ;
You can’t perform that action at this time.
0 commit comments