Merge pull request #12114 from Snuffleupagus/viewer-PDFJSDev-cleanup
Remove a couple of unnecessary `PDFJSDev` checks from the viewer
This commit is contained in:
commit
7b0c52fdfe
12
web/app.js
12
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(
|
||||
|
@ -112,7 +112,7 @@ const defaultOptions = {
|
||||
},
|
||||
pdfBugEnabled: {
|
||||
/** @type {boolean} */
|
||||
value: false,
|
||||
value: typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION"),
|
||||
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
||||
},
|
||||
printResolution: {
|
||||
|
Loading…
Reference in New Issue
Block a user