We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24c60ba commit 5ec88f7Copy full SHA for 5ec88f7
src/assets/js/app.js
@@ -10,6 +10,19 @@ $(() => {
10
});
11
hljs.highlightAll();
12
13
+ // Open details that is at the same level as the target of the hash
14
+ window.addEventListener("hashchange", () => {
15
+ const target = document.querySelector(window.location.hash);
16
+ if (!target) return;
17
+
18
+ const siblingDetails = target
19
+ .closest("div.method")
20
+ ?.querySelector("details");
21
+ if (siblingDetails) {
22
+ siblingDetails.open = true;
23
+ }
24
+ });
25
26
$("#navigation").load(`${config.rootPath}navigation.html`, () => {
27
$(".sidebar-sticky .icon").on("click", function (e) {
28
e.preventDefault();
0 commit comments