From 32a73f402b94345a28b7435d58f7200c60d3865e Mon Sep 17 00:00:00 2001 From: j Date: Fri, 27 Oct 2023 15:53:44 +0200 Subject: [PATCH] load pdf.js with version --- static/js/PDFViewer.js | 2 +- static/js/pandora.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/PDFViewer.js b/static/js/PDFViewer.js index 5404a423..d128f26e 100644 --- a/static/js/PDFViewer.js +++ b/static/js/PDFViewer.js @@ -59,7 +59,7 @@ Ox.PDFViewer = function(options, self) { .attr({ frameborder: 0, height: self.options.height + 'px', - src: self.options.pdfjsURL + '?file=' + encodeURIComponent(self.options.url) + '#page=' + self.options.page, + src: self.options.pdfjsURL + '?' + pandora.getVersion() + '&file=' + encodeURIComponent(self.options.url) + '#page=' + self.options.page, width: self.options.width + 'px' }) .onMessage(function(data, event) { diff --git a/static/js/pandora.js b/static/js/pandora.js index 0939d150..94c637f7 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -253,6 +253,7 @@ appPanel }); } }); + window.pandora.getVersion = getPandoraVersion } function loadPandoraFiles(callback) {