starlight-cannoli-plugins 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,10 +48,12 @@ function tabbedH2Content() {
|
|
|
48
48
|
);
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
const tocNav = document.querySelector(
|
|
52
|
+
"nav[aria-labelledby='starlight__on-this-page']"
|
|
53
|
+
);
|
|
54
|
+
if (!tocNav) {
|
|
53
55
|
console.log(
|
|
54
|
-
"[tabbedH2Content]
|
|
56
|
+
"[tabbedH2Content] nav[aria-labelledby='starlight__on-this-page'] not found \u2014 aborting"
|
|
55
57
|
);
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
@@ -166,7 +168,7 @@ function tabbedH2Content() {
|
|
|
166
168
|
toggleText.textContent = "Tabbed view";
|
|
167
169
|
toggleLabel.appendChild(checkbox);
|
|
168
170
|
toggleLabel.appendChild(toggleText);
|
|
169
|
-
|
|
171
|
+
tocNav.parentNode.insertBefore(toggleLabel, tocNav);
|
|
170
172
|
console.log(
|
|
171
173
|
"[tabbedH2Content] toggle checkbox injected after #starlight__on-this-page"
|
|
172
174
|
);
|
package/package.json
CHANGED