forked from getpelican/pelican-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwiki.js
More file actions
13 lines (13 loc) · 668 Bytes
/
wiki.js
File metadata and controls
13 lines (13 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
window.addEventListener("load", function() {
document.querySelector(".wiki-nav-button").addEventListener('click', function(event) {
document.querySelector(".wiki-links").classList.toggle('nodisplay');
event.target.text = event.target.text == "Expand Menu" ? "Collapse Menu" : "Expand Menu";
}, false);
var expanders = document.querySelectorAll(".wiki-dir-expander");
for (i = 0; i < expanders.length; ++i) {
expanders[i].addEventListener('click', function(event) {
event.target.parentElement.nextSibling.nextSibling.classList.toggle("nodisplay");
event.target.text = event.target.text == "+" ? "-" : "+";
}, false);
};
}, false);