File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/librustdoc/html/static Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 16231623 function toggleAllDocs ( ) {
16241624 var toggle = document . getElementById ( "toggle-all-docs" ) ;
16251625 if ( hasClass ( toggle , "will-expand" ) ) {
1626+ updateLocalStorage ( "collapse" , "false" ) ;
16261627 removeClass ( toggle , "will-expand" ) ;
16271628 onEveryMatchingChild ( toggle , "inner" , function ( e ) {
16281629 e . innerHTML = labelForToggleButton ( false ) ;
16321633 collapseDocs ( e , "show" ) ;
16331634 } ) ;
16341635 } else {
1636+ updateLocalStorage ( "collapse" , "true" ) ;
16351637 addClass ( toggle , "will-expand" ) ;
16361638 onEveryMatchingChild ( toggle , "inner" , function ( e ) {
16371639 e . innerHTML = labelForToggleButton ( true ) ;
19721974 window . onresize = function ( ) {
19731975 hideSidebar ( ) ;
19741976 } ;
1977+
1978+ if ( getCurrentValue ( "collapse" ) === "true" ) {
1979+ toggleAllDocs ( ) ;
1980+ }
19751981} ( ) ) ;
19761982
19771983// Sets the focus on the search bar at the top of the page
You can’t perform that action at this time.
0 commit comments