File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -1172,6 +1172,15 @@ function initPopup() {
1172
1172
createdPills [ pillId ] = true ;
1173
1173
} ) ;
1174
1174
}
1175
+ // count the number of immediate div elements inside the #summaries-container, excluding any divs with class .aiQuestionFormContainer
1176
+ var summariesContainer = document . querySelector ( '#summaries-container' ) ;
1177
+ var divCount = Array . from ( summariesContainer . children ) . filter ( child => child . tagName === 'DIV' && ! child . classList . contains ( 'aiQuestionFormContainer' ) ) . length ;
1178
+
1179
+ console . log ( "divCount: " + divCount ) ;
1180
+ // if there is less than 2 div elements inside the #summaries-container, hide the summary menu
1181
+ if ( divCount < 2 ) {
1182
+ document . querySelector ( '#summary-menu' ) . style . display = 'none' ;
1183
+ }
1175
1184
}
1176
1185
} ) ;
1177
1186
updatePremiumFeaturesVisibility ( ) ;
You can’t perform that action at this time.
0 commit comments