-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·28 lines (25 loc) · 839 Bytes
/
index.js
File metadata and controls
executable file
·28 lines (25 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(() => {
// handling for the macOS instructions foldable section
const fold = document.getElementById("mac-instructions-fold");
const icon = document.getElementById("mac-instructions-fold-icon");
let folded = false;
const toggle = () => {
if (folded) {
// unfold
icon.innerText = "-";
fold.style.display = "block";
folded = false;
} else {
// fold
icon.innerText = "+";
fold.style.display = "none";
folded = true;
}
};
document.getElementById("mac-instructions-fold-trigger").addEventListener("click", e => {
e.preventDefault();
toggle();
});
// the section is unfolded by default in the HTML, but we want it folded by default if JS is enabled
toggle();
})();