File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -98,24 +98,15 @@ function setupShortcuts(shortcutDepth = 2) {
9898
9999 shortcutDepth += 1 ; // to account for the page title
100100
101- /*
102- * We have build selectors to find headers in different contexts.
103- * i. direct children of .content-container (main structure)
104- * i. headers within tabpanels (for tabbed content)
105- */
101+ // Build a class selector for each header type, and concatenate with commas
106102 let classes = "" ;
107-
108103 for ( let i = 2 ; i <= shortcutDepth ; i ++ ) {
109104 if ( i != 2 ) {
110105 classes += "," ;
111106 }
112107 classes += " .content-container > h" + i ;
113108 }
114109
115- for ( let i = 2 ; i <= shortcutDepth ; i ++ ) {
116- classes += ", [role='tabpanel'] > h" + i ;
117- }
118-
119110 const classElements = Array . from ( document . querySelectorAll ( classes ) ) ;
120111
121112 // Only proceed if we found headers (to avoid creating an empty shortcuts section)
You can’t perform that action at this time.
0 commit comments