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).
This commit is contained in:
Jonas Jenwald 2021-03-17 21:03:24 +01:00
parent a164941351
commit 2d727e6e68
2 changed files with 2 additions and 4 deletions

View File

@ -153,7 +153,7 @@
},
"enableScripting": {
"type": "boolean",
"default": false
"default": true
},
"enablePermissions": {
"type": "boolean",

View File

@ -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: {