Skip to content

Commit

Permalink
Fix duplicated js
Browse files Browse the repository at this point in the history
  • Loading branch information
wilwade committed Nov 20, 2024
1 parent 812f381 commit 9b044e6
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions theme/book.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,16 +495,6 @@ function playground_text(playground, hidden = true) {
} catch (e) {}
}

var sidebarAnchorToggles = document.querySelectorAll("#sidebar a.toggle");

function toggleSection(ev) {
ev.currentTarget.parentElement.classList.toggle("expanded");
}

Array.from(sidebarAnchorToggles).forEach(function (el) {
el.addEventListener("click", toggleSection);
});

function hideSidebar() {
if (sidebarToggleAnchor.checked !== false) {
sidebarToggleAnchor.checked = false;
Expand Down

0 comments on commit 9b044e6

Please sign in to comment.