Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-factor and clean-up some preference related code in viewer.js #5895

Merged
merged 3 commits into from
Apr 1, 2015
Merged

Re-factor and clean-up some preference related code in viewer.js #5895

merged 3 commits into from
Apr 1, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

For details, please refer to the individual commit messages.

These patches slightly re-factors the handling of a couple of preferences in viewer.js, and also simplifies the code that sets the initial document position on load.

Edit: Also, the ?w=1 URL flag should simplify things when reviewing the last patch!

…rApplication.initialize|

For consistency, this preference should be placed amongst the others. The current position is purely for "historical" reasons, since it was one of the first preferences that was added to the code.
…wOnLoad| preference is set to |false|

Since this code is *only* necessary if/when the history is actually enabled, this patch refactors it to actually reflect that.
…tialView|

This is a minor cleanup, to avoid an unnecessary `Promise.all` and to simplify catching |ViewHistory| errors.
@Snuffleupagus Snuffleupagus changed the title Re-factor and clean-up Re-factor and clean-up some preference related code in viewer.js Apr 1, 2015
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Apr 1, 2015

From: Bot.io (Linux)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/edb27b4bfd2a2c2/output.txt

timvandermeij added a commit that referenced this pull request Apr 1, 2015
Re-factor and clean-up some preference related code in viewer.js
@timvandermeij timvandermeij merged commit a7e6f6d into mozilla:master Apr 1, 2015
@timvandermeij
Copy link
Contributor

Nice refactoring, thank you!

@Snuffleupagus Snuffleupagus deleted the viewer-pref-init-refactor branch April 1, 2015 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants