mozilla/pdf.js — pull request #4669 by Snuffleupagus (2014-04-24 11:24:17+00:00)
Title: Add a preference to set the sidebarView on load

As promised in https://github.com/mozilla/pdf.js/pull/4329#discussion-diff-11768622, this PR adds a preference (`sidebarViewOnLoad`) that enables the user to choose if (and with what view) the sidebar should be opened when the viewer loads.

This PR thus removes one of the current prefs (`ifAvailableShowOutlineOnLoad`) in favour of the new one. Furthermore it also re-factors the way that the sidebar is opened, to avoid duplicating code in multiple places (hence the multiple commits).

As a follow-up to this PR, I'm thinking that it could be a good idea to add a Wiki page describing the available preferences. The reason that I didn't do so after support for preferences initially landed, is that I didn't want to advertise this feature too much until:
a) The actual preference implementation had stabilized.
b) We had more preferences available, and the names had stabilized.
c) Until the preferences made their way into Firefox.