-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscriptf.js
More file actions
20 lines (18 loc) · 818 Bytes
/
scriptf.js
File metadata and controls
20 lines (18 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Only cosmetics for the index.html and style.css
// No interactions with main content or server
var navIsOpen = true;
function navOpenClose() {
var sidebar = document.getElementsByTagName("sidebar")[0];
var navButton = document.getElementById("navButton");
sidebar.style.width = navIsOpen ? "0%" : "20%";
navButton.style.marginLeft = navIsOpen ? "0%" : "20%";
navButton.innerText = (navIsOpen ? "Open Menu" : "Close Menu");
navIsOpen = !navIsOpen;
}
var anoIsOpen = false;
function anoOpenClose() {
document.getElementsByClassName("annotation-selector")[0].style.height = anoIsOpen ? "0%" : "20%";
document.getElementById("anoButton").style.bottom = anoIsOpen ? "0%" : "20%";
document.getElementById("anoButton").innerText = (anoIsOpen ? "Open Animations" : "Close Animations");
anoIsOpen = !anoIsOpen;
}