Reduce a tiny bit of duplication in the webViewerInitialized
function
This commit is contained in:
parent
d930f267f6
commit
d6178a13d7
@ -2166,7 +2166,7 @@ function reportPageStatsPDFBug({ pageNumber }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function webViewerInitialized() {
|
function webViewerInitialized() {
|
||||||
const { appConfig, eventBus } = PDFViewerApplication;
|
const { appConfig, eventBus, l10n } = PDFViewerApplication;
|
||||||
let file;
|
let file;
|
||||||
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
||||||
const queryString = document.location.search.substring(1);
|
const queryString = document.location.search.substring(1);
|
||||||
@ -2217,7 +2217,7 @@ function webViewerInitialized() {
|
|||||||
|
|
||||||
if (!PDFViewerApplication.supportsDocumentFonts) {
|
if (!PDFViewerApplication.supportsDocumentFonts) {
|
||||||
AppOptions.set("disableFontFace", true);
|
AppOptions.set("disableFontFace", true);
|
||||||
PDFViewerApplication.l10n.get("web_fonts_disabled").then(msg => {
|
l10n.get("web_fonts_disabled").then(msg => {
|
||||||
console.warn(msg);
|
console.warn(msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2259,7 +2259,7 @@ function webViewerInitialized() {
|
|||||||
throw new Error("Not implemented: webViewerInitialized");
|
throw new Error("Not implemented: webViewerInitialized");
|
||||||
}
|
}
|
||||||
} catch (reason) {
|
} catch (reason) {
|
||||||
PDFViewerApplication.l10n.get("loading_error").then(msg => {
|
l10n.get("loading_error").then(msg => {
|
||||||
PDFViewerApplication._documentError(msg, reason);
|
PDFViewerApplication._documentError(msg, reason);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user