Skip to content

Commit 0bf458b

Browse files
Add back :not([role='tabpanel']) with a catch
1 parent 88aa751 commit 0bf458b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assets/js/shortcuts.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ function setupShortcuts(shortcutDepth = 2) {
9999
shortcutDepth += 1; // to account for the page title
100100

101101
// Build a class selector for each header type, and concatenate with commas
102+
// Note the intentional lack of a space between .content-container and
103+
// :not([role='tabpanel']) here.
102104
let classes = "";
103105
for (let i = 2; i <= shortcutDepth; i++) {
104106
if (i != 2) {
105107
classes += ",";
106108
}
107-
classes += " .content-container > h" + i;
109+
classes += " .content-container:not([role='tabpanel']) > h" + i;
108110
}
109111

110112
const classElements = Array.from(document.querySelectorAll(classes));

0 commit comments

Comments
 (0)