Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the debuggerSrc-parameter into the AppOptions #17593

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions web/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2167,11 +2167,10 @@ async function loadFakeWorker() {
}

async function loadPDFBug(self) {
const { debuggerScriptPath } = self.appConfig;
const { PDFBug } =
typeof PDFJSDev === "undefined"
? await import(debuggerScriptPath) // eslint-disable-line no-unsanitized/method
: await __non_webpack_import__(debuggerScriptPath);
? await import(AppOptions.get("debuggerSrc")) // eslint-disable-line no-unsanitized/method
: await __non_webpack_import__(AppOptions.get("debuggerSrc"));

self._PDFBug = PDFBug;
}
Expand Down
5 changes: 5 additions & 0 deletions web/app_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ const defaultOptions = {
value: 0,
kind: OptionKind.VIEWER + OptionKind.PREFERENCE,
},
debuggerSrc: {
/** @type {string} */
value: "./debugger.mjs",
kind: OptionKind.VIEWER,
},
defaultZoomDelay: {
/** @type {number} */
value: 400,
Expand Down
1 change: 0 additions & 1 deletion web/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ function getViewerConfiguration() {
),
},
printContainer: document.getElementById("printContainer"),
debuggerScriptPath: "./debugger.mjs",
};
}

Expand Down