the-glorious-startpage/js/centered-box.js

25 lines
537 B
JavaScript

var centeredBox = document.getElementById("centeredBox");
let centeredBoxVisibility = true;
const showCenteredBox = () => {
centeredBox.classList.remove('hiddenBox');
centeredBoxVisibility = !centeredBoxVisibility;
}
const hideCenteredBox = () => {
centeredBox.classList.add('hiddenBox');
centeredBoxVisibility = !centeredBoxVisibility;
}
const toggleCenteredBox = () => {
if (centeredBoxVisibility) {
// Hide web menu
hideCenteredBox();
} else {
// Show Web menu
showCenteredBox();
}
}