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

Move Chromium URL rewrite to top of viewer.js #7430

Merged
merged 1 commit into from
Jun 24, 2016

Conversation

Rob--W
Copy link
Member

@Rob--W Rob--W commented Jun 23, 2016

Move the Chromium-specific URL rewriting code to the top of viewer.js (before the PDF.js library) to make sure that the URL is as expected.

This ensures that variables that synchronously depends on the URL (e.g. PDFViewerApplication.initialBookmark) are properly set.

Test:

  1. Build the extension.
  2. Visit https://bitcoin.org/bitcoin.pdf#search=bitcoin
  3. Wait until the viewer finished loading, and verify that the "bitcoin" strings (e.g. in the title) are highlighted due to the search param.

This is currently broken, which I learned through a feature request from the Chrome Web Store (asking for #search= to work, while I was pretty sure that it should work).

Move the Chromium-specific URL rewriting code to the top of viewer.js
(before the PDF.js library) to make sure that the URL is as expected.

This ensures that variables that synchronously depends on the URL
(e.g. PDFViewerApplication.initialBookmark) are properly set.
@Snuffleupagus
Copy link
Collaborator

Thank you!

@Snuffleupagus Snuffleupagus merged commit 2d8ed7b into mozilla:master Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants