diff --git a/web/app.js b/web/app.js index 2af3a511e..5f4cc827c 100644 --- a/web/app.js +++ b/web/app.js @@ -824,8 +824,10 @@ const PDFViewerApplication = { async close() { this._unblockDocumentLoadEvent(); - const errorWrapper = this.appConfig.errorWrapper.container; - errorWrapper.hidden = true; + if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) { + const { container } = this.appConfig.errorWrapper; + container.hidden = true; + } if (!this.pdfLoadingTask) { return undefined; @@ -1421,7 +1423,10 @@ const PDFViewerApplication = { pdfViewer.optionalContentConfigPromise.then(optionalContentConfig => { this.pdfLayerViewer.render({ optionalContentConfig, pdfDocument }); }); - if ("requestIdleCallback" in window) { + if ( + (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) || + "requestIdleCallback" in window + ) { const callback = window.requestIdleCallback( () => { this._collectTelemetry(pdfDocument); diff --git a/web/pdf_cursor_tools.js b/web/pdf_cursor_tools.js index c55bf34bc..39cc532f7 100644 --- a/web/pdf_cursor_tools.js +++ b/web/pdf_cursor_tools.js @@ -129,8 +129,6 @@ class PDFCursorTools { this.eventBus._on("presentationmodechanged", evt => { switch (evt.state) { - case PresentationModeState.CHANGING: - break; case PresentationModeState.FULLSCREEN: { const previouslyActive = this.active; diff --git a/web/viewer.html b/web/viewer.html index 4f1d08091..c390ba62e 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -320,6 +320,7 @@ See https://github.com/adobe-type-tools/cmap-resources
+