Skip to content

Commit 88aa751

Browse files
Revert "Handle headers within tabpanels"
This reverts commit ef7bf8f.
1 parent ef7bf8f commit 88aa751

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

assets/js/shortcuts.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)