From 2d727e6e68c14f329680e2c9cba020fa63f88602 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 17 Mar 2021 21:03:24 +0100 Subject: [PATCH] Enable scripting by default in the viewer (PR 13053 follow-up) Given that https://bugzilla.mozilla.org/show_bug.cgi?id=1699219 has enabled scripting for all Firefox-channels, it seems reasonable to simply set `enableScripting = true` unconditionally in the viewer preferences/options. For now, this patch leaves the standalone viewer-components alone (such as e.g. `BaseViewer`), and if those are used scripting will thus have to be manually enabled (see e.g. the "simpleviewer"/"singlepageviewer" examples). --- extensions/chromium/preferences_schema.json | 2 +- web/app_options.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/extensions/chromium/preferences_schema.json b/extensions/chromium/preferences_schema.json index de2ae62df..595de9123 100644 --- a/extensions/chromium/preferences_schema.json +++ b/extensions/chromium/preferences_schema.json @@ -153,7 +153,7 @@ }, "enableScripting": { "type": "boolean", - "default": false + "default": true }, "enablePermissions": { "type": "boolean", diff --git a/web/app_options.js b/web/app_options.js index f88932034..44349c2fe 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -67,9 +67,7 @@ const defaultOptions = { }, enableScripting: { /** @type {boolean} */ - value: - typeof PDFJSDev === "undefined" || - PDFJSDev.test("!PRODUCTION || TESTING"), + value: true, kind: OptionKind.VIEWER + OptionKind.PREFERENCE, }, enableWebGL: {