diff --git a/cps/static/js/pdf.js b/cps/static/js/pdf.js index 48cc161a..e0a31764 100644 --- a/cps/static/js/pdf.js +++ b/cps/static/js/pdf.js @@ -8608,16 +8608,16 @@ if (typeof __webpack_require__ !== 'undefined') { useRequireEnsure = true; } if (typeof requirejs !== 'undefined' && requirejs.toUrl) { - workerSrc = requirejs.toUrl('/static/js/pdf.worker.js'); + workerSrc = requirejs.toUrl(PDFWORKER_LOCATION); } var dynamicLoaderSupported = typeof requirejs !== 'undefined' && requirejs.load; var fakeWorkerFilesLoader = useRequireEnsure ? (function (callback) { require.ensure([], function () { - var worker = require('/static/js/pdf.worker.js'); + var worker = require(PDFWORKER_LOCATION); callback(worker.WorkerMessageHandler); }); }) : dynamicLoaderSupported ? (function (callback) { - requirejs(['/static/js/pdf.worker'], function (worker) { + requirejs(['PDFWORKER_LOCATION_JS'], function (worker) { callback(worker.WorkerMessageHandler); }); }) : null; diff --git a/cps/static/js/viewer.js b/cps/static/js/viewer.js index a7f045f3..88a2c2d1 100644 --- a/cps/static/js/viewer.js +++ b/cps/static/js/viewer.js @@ -6952,7 +6952,7 @@ var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; function configure(PDFJS) { PDFJS.imageResourcesPath = './images/'; - PDFJS.workerSrc = '/static/js/pdf.worker.js'; + PDFJS.workerSrc = PDFWORKER_LOCATION; PDFJS.cMapUrl = '../web/cmaps/'; PDFJS.cMapPacked = true; } diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 2cb6f198..682eff92 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -5,7 +5,7 @@