1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

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

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