Is there a JavaScript to show (or hide) the sidebar?


Hello all,

I am working on a script, and I need a way to hide the sidebar if is showing. Can this be done with JavaScript?




AppleScript would work as well. Any ideas?


I’m a newbie in the automation department but I think you can achieve this by programmatically clicking the menubar item View > Show Sidebar.

For reference: