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
|
* @private
|
||||||
*/
|
*/
|
||||||
async _parseHashParameters() {
|
async _parseHashParameters() {
|
||||||
if (
|
if (!AppOptions.get("pdfBugEnabled")) {
|
||||||
typeof PDFJSDev !== "undefined" &&
|
|
||||||
PDFJSDev.test("PRODUCTION") &&
|
|
||||||
!AppOptions.get("pdfBugEnabled")
|
|
||||||
) {
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const hash = document.location.hash.substring(1);
|
const hash = document.location.hash.substring(1);
|
||||||
@ -1931,11 +1927,7 @@ function webViewerInitialized() {
|
|||||||
appConfig.secondaryToolbar.openFileButton.setAttribute("hidden", "true");
|
appConfig.secondaryToolbar.openFileButton.setAttribute("hidden", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (!PDFViewerApplication.supportsDocumentFonts) {
|
||||||
(typeof PDFJSDev === "undefined" ||
|
|
||||||
PDFJSDev.test("MOZCENTRAL || GENERIC")) &&
|
|
||||||
!PDFViewerApplication.supportsDocumentFonts
|
|
||||||
) {
|
|
||||||
AppOptions.set("disableFontFace", true);
|
AppOptions.set("disableFontFace", true);
|
||||||
PDFViewerApplication.l10n
|
PDFViewerApplication.l10n
|
||||||
.get(
|
.get(
|
||||||
|
@ -112,7 +112,7 @@ const defaultOptions = {
|
|||||||
},
|
},
|
||||||
pdfBugEnabled: {
|
pdfBugEnabled: {
|
||||||
/** @type {boolean} */
|
/** @type {boolean} */
|
||||||
value: false,
|
value: typeof PDFJSDev === "undefined" || !PDFJSDev.test("PRODUCTION"),
|
||||||
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
|
||||||
},
|
},
|
||||||
printResolution: {
|
printResolution: {
|
||||||
|
Loading…
Reference in New Issue
Block a user