From eb0cc7f9c316de91990a2a3baa7a205951a4dda5 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 3 Oct 2020 09:11:52 +0200 Subject: [PATCH] Add `version`/`build` info at the top of the *built* `web/viewer.js` file This should be helpful to easily determine the *exact* version of the viewer itself, when looking at a *built* `web/viewer.js` file. Note that we're already including this information in other built files, such as e.g. `pdf.js`, `pdf.worker.js`, `pdf_viewer.js`, and `pdf.image_decoders.js`. --- web/viewer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/viewer.js b/web/viewer.js index 44f20ecc2..15ef9ca0e 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -15,6 +15,13 @@ "use strict"; +/* eslint-disable-next-line no-unused-vars */ +const pdfjsVersion = + typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_VERSION") : void 0; +/* eslint-disable-next-line no-unused-vars */ +const pdfjsBuild = + typeof PDFJSDev !== "undefined" ? PDFJSDev.eval("BUNDLE_BUILD") : void 0; + if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("CHROME")) { var defaultUrl; // eslint-disable-line no-var