Update app.js

This commit is contained in:
Aditya kumar singh 2025-09-16 00:33:42 +05:30
parent e751fd0f68
commit 244c528883

View File

@ -649,8 +649,8 @@ const PDFViewerApplication = {
overlayManager, overlayManager,
eventBus, eventBus,
l10n, l10n,
/* fileNameLookup = */ () => this._docFilename, /* fileNameLookup = */() => this._docFilename,
/* titleLookup = */ () => this._docTitle /* titleLookup = */() => this._docTitle
); );
} }
@ -778,7 +778,7 @@ const PDFViewerApplication = {
const params = parseQueryString(queryString); const params = parseQueryString(queryString);
file = params.get("file") ?? AppOptions.get("defaultUrl"); file = params.get("file") ?? AppOptions.get("defaultUrl");
try { try {
file = new URL(decodeURIComponent(file)).href; file = new URL(file).href;
} catch { } catch {
file = encodeURIComponent(file).replaceAll("%2F", "/"); file = encodeURIComponent(file).replaceAll("%2F", "/");
} }
@ -2380,7 +2380,7 @@ const PDFViewerApplication = {
document.blockUnblockOnload?.(false); document.blockUnblockOnload?.(false);
// Ensure that this method is only ever run once. // Ensure that this method is only ever run once.
this._unblockDocumentLoadEvent = () => {}; this._unblockDocumentLoadEvent = () => { };
}, },
/** /**