mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 01:35:43 +02:00
Stop including the "errorWrapper" HTML code in MOZCENTRAL
-builds
Given that these HTML elements are not being used at all in `MOZCENTRAL`-builds, note the preprocessor check in `PDFViewerApplication._otherError`, we obviously don't need the HTML code either.
This commit is contained in:
parent
c79fd71457
commit
7f8a9b12d9
3 changed files with 19 additions and 10 deletions
|
@ -61,6 +61,18 @@ if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("CHROME || GENERIC")) {
|
|||
}
|
||||
|
||||
function getViewerConfiguration() {
|
||||
let errorWrapper = null;
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
errorWrapper = {
|
||||
container: document.getElementById("errorWrapper"),
|
||||
errorMessage: document.getElementById("errorMessage"),
|
||||
closeButton: document.getElementById("errorClose"),
|
||||
errorMoreInfo: document.getElementById("errorMoreInfo"),
|
||||
moreInfoButton: document.getElementById("errorShowMore"),
|
||||
lessInfoButton: document.getElementById("errorShowLess"),
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
appContainer: document.body,
|
||||
mainContainer: document.getElementById("viewerContainer"),
|
||||
|
@ -177,14 +189,7 @@ function getViewerConfiguration() {
|
|||
linearized: document.getElementById("linearizedField"),
|
||||
},
|
||||
},
|
||||
errorWrapper: {
|
||||
container: document.getElementById("errorWrapper"),
|
||||
errorMessage: document.getElementById("errorMessage"),
|
||||
closeButton: document.getElementById("errorClose"),
|
||||
errorMoreInfo: document.getElementById("errorMoreInfo"),
|
||||
moreInfoButton: document.getElementById("errorShowMore"),
|
||||
lessInfoButton: document.getElementById("errorShowLess"),
|
||||
},
|
||||
errorWrapper,
|
||||
printContainer: document.getElementById("printContainer"),
|
||||
openFileInputName: "fileInput",
|
||||
debuggerScriptPath: "./debugger.js",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue