@@ -738,9 +738,6 @@ function RequestNewPage(
738738) {
739739 const $articleContent = $ ( "#articleContent" ) ;
740740 const $loadingContent = $ ( "#loadingContent" ) ;
741- const $languageWrap = $ ( ".languageWrap" ) ;
742- const $fullTreeContainer = $ ( "#fullTreeMenuListContainer" ) ;
743- const $autoGenerateSidebar = $ ( "#AutoGenerateSidebar" ) ;
744741 const hash =
745742 paramLink . split ( "#" ) . length > 1
746743 ? paramLink . split ( "#" ) [ 1 ] . toLowerCase ( )
@@ -764,6 +761,7 @@ function RequestNewPage(
764761 }
765762
766763 // init language select container
764+ const $languageWrap = $ ( ".languageWrap" ) ;
767765 let languageWrapItem = $parsedDoc . find ( ".languageWrap" ) ;
768766 if (
769767 languageWrapItem &&
@@ -847,6 +845,7 @@ function RequestNewPage(
847845 ! onlyLoadContent && history . pushState ( null , null , paramLink ) ;
848846
849847 // remove old active link and li style
848+ const $fullTreeContainer = $ ( "#fullTreeMenuListContainer" ) ;
850849 var activeLinkParents = $fullTreeContainer . find ( ".activeLink" ) . parents ( "li" ) ;
851850 for ( var i = 0 ; i < activeLinkParents . length ; i ++ ) {
852851 var obj = activeLinkParents [ i ] ;
@@ -906,6 +905,7 @@ function RequestNewPage(
906905 }
907906
908907 // noTitleIndex
908+ const $autoGenerateSidebar = $ ( "#AutoGenerateSidebar" ) ;
909909 if ( $ ( ".headCounter" ) . hasClass ( "noTitleIndex" ) ) {
910910 $autoGenerateSidebar . addClass ( "noTitleIndex" ) ;
911911 } else {
@@ -934,7 +934,9 @@ function RequestNewPage(
934934 }
935935
936936 // load breadcrumbs add right side menu
937+ console . log ( "load breadcrumbs and right side menu" , $autoGenerateSidebar . length ) ;
937938 if ( $autoGenerateSidebar . length > 0 ) {
939+ console . log ( "auto generate sidebar" ) ;
938940 $fullTreeContainer . removeClass ( "needh3" ) ;
939941 if ( needh3 ) {
940942 $fullTreeContainer . addClass ( "needh3" ) ;
0 commit comments