From 6ac3da0d1fae221ff7305c96985fea08f3ccc664 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sun, 8 Oct 2023 13:14:09 +0200 Subject: [PATCH] Rename `web/debugger.js` since it's actually a JavaScript module (PR 17055 follow-up) It's been loaded as a JavaScript module for a long time, and given that the file is bundled as-is (without building) it seems reasonable to just change the file extension now. --- gulpfile.mjs | 2 +- web/{debugger.js => debugger.mjs} | 2 +- web/viewer.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename web/{debugger.js => debugger.mjs} (99%) diff --git a/gulpfile.mjs b/gulpfile.mjs index bf589fbc39d4d..405374f6886da 100644 --- a/gulpfile.mjs +++ b/gulpfile.mjs @@ -68,7 +68,7 @@ const TMP_DIR = BUILD_DIR + "tmp/"; const TYPESTEST_DIR = BUILD_DIR + "typestest/"; const COMMON_WEB_FILES = [ "web/images/*.{png,svg,gif}", - "web/debugger.{css,js}", + "web/debugger.{css,mjs}", ]; const MOZCENTRAL_DIFF_FILE = "mozcentral.diff"; diff --git a/web/debugger.js b/web/debugger.mjs similarity index 99% rename from web/debugger.js rename to web/debugger.mjs index 9160f840f1dd4..9fe79d8c120ed 100644 --- a/web/debugger.js +++ b/web/debugger.mjs @@ -574,7 +574,7 @@ class PDFBug { const link = document.createElement("link"); link.rel = "stylesheet"; - link.href = url.replace(/.js$/, ".css"); + link.href = url.replace(/\.mjs$/, ".css"); document.head.append(link); } diff --git a/web/viewer.js b/web/viewer.js index bfe7b3e876c5f..3e2947f0fcf51 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -178,7 +178,7 @@ function getViewerConfiguration() { typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC") ? document.getElementById("fileInput") : null, - debuggerScriptPath: "./debugger.js", + debuggerScriptPath: "./debugger.mjs", }; }