File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -98,14 +98,7 @@ function setupShortcuts(shortcutDepth = 2) {
9898
9999 shortcutDepth += 1 ; // to account for the page title
100100
101- /*
102- * Build selectors for both patterns:
103- * 1. Direct children of .content-container (for headers directly in the container)
104- * 2. Headers within wrappers inside .content-container (for when content-wrapper is used)
105- *
106- * This works with both DOM structures we might encounter, whether the templates
107- * have been updated to use content-wrapper or not (just in case).
108- */
101+ // Build a class selector for each header type, and concatenate with commas
109102 let classes = "" ;
110103 for ( let i = 2 ; i <= shortcutDepth ; i ++ ) {
111104 if ( i != 2 ) {
@@ -114,10 +107,6 @@ function setupShortcuts(shortcutDepth = 2) {
114107 classes += " .content-container > h" + i ;
115108 }
116109
117- for ( let i = 2 ; i <= shortcutDepth ; i ++ ) {
118- classes += ", .content-wrapper > h" + i ;
119- }
120-
121110 const classElements = Array . from ( document . querySelectorAll ( classes ) ) ;
122111
123112 // 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