From 77aa86e275897be4cfa816be1a68ef663a93e311 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 17 Jun 2022 11:25:55 +0200 Subject: [PATCH] Stop defining the `defaultUrl`-option in the MOZCENTRAL viewer This option is not used, nor has it ever been used, in the *built-in* Firefox PDF Viewer. Hence we can define it only for the environments where it makes sense instead. --- web/app_options.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/web/app_options.js b/web/app_options.js index d75277c56..5447c4238 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -74,11 +74,6 @@ const defaultOptions = { value: 0, kind: OptionKind.VIEWER + OptionKind.PREFERENCE, }, - defaultUrl: { - /** @type {string} */ - value: "compressed.tracemonkey-pldi-09.pdf", - kind: OptionKind.VIEWER, - }, defaultZoomValue: { /** @type {string} */ value: "", @@ -296,6 +291,11 @@ if ( typeof PDFJSDev === "undefined" || PDFJSDev.test("!PRODUCTION || GENERIC") ) { + defaultOptions.defaultUrl = { + /** @type {string} */ + value: "compressed.tracemonkey-pldi-09.pdf", + kind: OptionKind.VIEWER, + }; defaultOptions.disablePreferences = { /** @type {boolean} */ value: typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING"), @@ -320,6 +320,11 @@ if ( defaultOptions.renderer.kind += OptionKind.PREFERENCE; } else if (PDFJSDev.test("CHROME")) { + defaultOptions.defaultUrl = { + /** @type {string} */ + value: "", + kind: OptionKind.VIEWER, + }; defaultOptions.disableTelemetry = { /** @type {boolean} */ value: false,