File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 5252 var start = elemClass . indexOf ( className ) ;
5353 if ( start == - 1 ) {
5454 return false ;
55- } else if ( elemClass . length == className . length ) {
55+ } else if ( elemClass . length === className . length ) {
5656 return true ;
5757 } else {
58- if ( start > 0 && elemClass [ start - 1 ] != ' ' ) {
58+ if ( start > 0 && elemClass [ start - 1 ] !== ' ' ) {
5959 return false ;
6060 }
6161 var end = start + className . length ;
62- if ( end < elemClass . length && elemClass [ end ] != ' ' ) {
62+ if ( end < elemClass . length && elemClass [ end ] !== ' ' ) {
6363 return false ;
6464 }
6565 return true ;
151151 removeClass ( document . getElementById ( "main" ) , "hidden" ) ;
152152 var hash = ev . newURL . slice ( ev . newURL . indexOf ( '#' ) + 1 ) ;
153153 if ( browserSupportsHistoryApi ( ) ) {
154- history . replaceState ( hash , "" , "#" + hash ) ;
154+ history . replaceState ( hash , "" , "?search= #" + hash ) ;
155155 }
156156 var elem = document . getElementById ( hash ) ;
157157 if ( elem ) {
15681568
15691569 if ( search_input ) {
15701570 search_input . onfocus = function ( ) {
1571- if ( search . value !== "" ) {
1571+ if ( search_input . value !== "" ) {
15721572 addClass ( document . getElementById ( "main" ) , "hidden" ) ;
15731573 removeClass ( document . getElementById ( "search" ) , "hidden" ) ;
1574+ if ( browserSupportsHistoryApi ( ) ) {
1575+ history . replaceState ( search_input . value ,
1576+ "" ,
1577+ "?search=" + encodeURIComponent ( search_input . value ) ) ;
1578+ }
15741579 }
15751580 } ;
15761581 }
You can’t perform that action at this time.
0 commit comments