diff --git a/web/app.js b/web/app.js index 774fbf7d0..e84a2af22 100644 --- a/web/app.js +++ b/web/app.js @@ -299,11 +299,7 @@ const PDFViewerApplication = { * @private */ async _parseHashParameters() { - if ( - typeof PDFJSDev !== "undefined" && - PDFJSDev.test("PRODUCTION") && - !AppOptions.get("pdfBugEnabled") - ) { + if (!AppOptions.get("pdfBugEnabled")) { return undefined; } const hash = document.location.hash.substring(1); @@ -1931,11 +1927,7 @@ function webViewerInitialized() { appConfig.secondaryToolbar.openFileButton.setAttribute("hidden", "true"); } - if ( - (typeof PDFJSDev === "undefined" || - PDFJSDev.test("MOZCENTRAL || GENERIC")) && - !PDFViewerApplication.supportsDocumentFonts - ) { + if (!PDFViewerApplication.supportsDocumentFonts) { AppOptions.set("disableFontFace", true); PDFViewerApplication.l10n .get( diff --git a/web/app_options.js b/web/app_options.js index 8b68d7525..a38542649 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -112,7 +112,7 @@ const defaultOptions = { }, pdfBugEnabled: { /** @type {boolean} */ - value: false, + value: typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION"), kind: OptionKind.VIEWER + OptionKind.PREFERENCE, }, printResolution: {