On toggle show sidebar:
On toggle hide sidebar:
The sidebar will be automatically hidden. When you want to see the sidebar, take the mouse to the right edge of the screen and the sidebar will appear. Then as long as you keep the mouse in the sidebar area, the sidebar will stay.
It is free and open source. Licensed under MIT License.
You can download it from Github Gist.
Google Chrome, Mozilla Firefox, Opera, Microsoft Edge. Windows, macOS, Linux (All distros).
I created this script and you can ping me here.