Configuration:
Web browser and its version: Google Chrome : Version 63.0.3239.132 (Official Build) (64-bit)
Operating system and its version: Windows 10 x64
PDF.js version: 2.0.943
Is a browser extension: No
I want to hide sidebar. Please give me your suggestions.
You can make a custom build where you remove the sidebar HTML elements and the JavaScript code that initializes the sidebar, which is https://github.com/mozilla/pdf.js/blob/master/web/app.js#L383-L403 amongst other usages in that file.
What about just by default making it hidden vs expanded? That seems like it should be some kind of a parameter or very easy change. Unfortunately the viewer.js is like 13,000 lines of code. I can't find where to keep it collapsed.
Theoretically, it can be reached by a corresponding option in the URL hash: https://github.com/mozilla/pdf.js/wiki/Viewer-options It also works with the example implementation: https://mozilla.github.io/pdf.js/web/viewer.html#page=2&pagemode=none (pagemode=none is the switch in question). However, it doesn't work for me in a slightly more involved setting (pdf.js embedded in an iframe whose src is set dynamically)...
Most helpful comment
What about just by default making it hidden vs expanded? That seems like it should be some kind of a parameter or very easy change. Unfortunately the viewer.js is like 13,000 lines of code. I can't find where to keep it collapsed.