Browse Source

Assign a dummy value to the `docBaseUrl` API parameter in non-`PRODUCTION` mode

This ensures that relative links are displayed when using the viewer in `gulp server` mode, in an effort to aid development/debugging.
Jonas Jenwald 8 years ago
parent
commit
39a77c76ad
  1. 4
      web/app.js

4
web/app.js

@ -658,7 +658,9 @@ let PDFViewerApplication = { @@ -658,7 +658,9 @@ let PDFViewerApplication = {
this.setTitleUsingUrl(file.originalUrl);
parameters.url = file.url;
}
if (typeof PDFJSDev !== 'undefined' &&
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('PRODUCTION')) {
parameters.docBaseUrl = document.URL.split('#')[0];
} else if (typeof PDFJSDev !== 'undefined' &&
PDFJSDev.test('FIREFOX || MOZCENTRAL || CHROME')) {
parameters.docBaseUrl = this.baseUrl;
}

Loading…
Cancel
Save