// First, get a reference to our button in the DOM
const toggleEnlargeButton = document.querySelector('.toggle-button');
// Next, store the resize state of the menubar.
// By default the menubar isn't enlarged
// Set up a listener that triggers each time the button is clicked
toggleEnlargeButton.addEventListener('click', () => {
// If window is enlarged then shrink it
window.todesktop.window.menubar();
// If window is *not* enlarged then enlarge it
window.todesktop.window.menubar();