Merge pull request #15432 from Snuffleupagus/validateFileURL-var
Some *small* viewer clean-up for non-GENERIC builds
This commit is contained in:
commit
f7ab417757
@ -2179,14 +2179,14 @@ const PDFViewerApplication = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let validateFileURL;
|
|
||||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||||
const HOSTED_VIEWER_ORIGINS = [
|
const HOSTED_VIEWER_ORIGINS = [
|
||||||
"null",
|
"null",
|
||||||
"http://mozilla.github.io",
|
"http://mozilla.github.io",
|
||||||
"https://mozilla.github.io",
|
"https://mozilla.github.io",
|
||||||
];
|
];
|
||||||
validateFileURL = function (file) {
|
// eslint-disable-next-line no-var
|
||||||
|
var validateFileURL = function (file) {
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -69,18 +69,6 @@ if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("CHROME || GENERIC")) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getViewerConfiguration() {
|
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 {
|
return {
|
||||||
appContainer: document.body,
|
appContainer: document.body,
|
||||||
mainContainer: document.getElementById("viewerContainer"),
|
mainContainer: document.getElementById("viewerContainer"),
|
||||||
@ -207,7 +195,17 @@ function getViewerConfiguration() {
|
|||||||
editorInkThickness: document.getElementById("editorInkThickness"),
|
editorInkThickness: document.getElementById("editorInkThickness"),
|
||||||
editorInkOpacity: document.getElementById("editorInkOpacity"),
|
editorInkOpacity: document.getElementById("editorInkOpacity"),
|
||||||
},
|
},
|
||||||
errorWrapper,
|
errorWrapper:
|
||||||
|
typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")
|
||||||
|
? {
|
||||||
|
container: document.getElementById("errorWrapper"),
|
||||||
|
errorMessage: document.getElementById("errorMessage"),
|
||||||
|
closeButton: document.getElementById("errorClose"),
|
||||||
|
errorMoreInfo: document.getElementById("errorMoreInfo"),
|
||||||
|
moreInfoButton: document.getElementById("errorShowMore"),
|
||||||
|
lessInfoButton: document.getElementById("errorShowLess"),
|
||||||
|
}
|
||||||
|
: null,
|
||||||
printContainer: document.getElementById("printContainer"),
|
printContainer: document.getElementById("printContainer"),
|
||||||
openFileInput:
|
openFileInput:
|
||||||
typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")
|
typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")
|
||||||
|
Loading…
Reference in New Issue
Block a user