diff --git a/gulpfile.js b/gulpfile.js index d3da8bea5..611fef19c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1334,6 +1334,11 @@ gulp.task( const CHROME_BUILD_DIR = BUILD_DIR + "/chromium/", CHROME_BUILD_CONTENT_DIR = CHROME_BUILD_DIR + "/content/"; + const CHROME_WEB_FILES = [ + ...COMMON_WEB_FILES, + "!web/images/toolbarButton-openFile.svg", + ]; + // Clear out everything in the chrome extension build directory rimraf.sync(CHROME_BUILD_DIR); @@ -1353,7 +1358,7 @@ gulp.task( gulp.dest(CHROME_BUILD_CONTENT_DIR + "web") ), gulp - .src(COMMON_WEB_FILES, { base: "web/" }) + .src(CHROME_WEB_FILES, { base: "web/" }) .pipe(gulp.dest(CHROME_BUILD_CONTENT_DIR + "web")), gulp diff --git a/web/app.js b/web/app.js index 532ddb1a0..bd9951e70 100644 --- a/web/app.js +++ b/web/app.js @@ -2195,9 +2195,6 @@ function webViewerInitialized() { fileInput: evt.dataTransfer, }); }); - } else if (!PDFJSDev.test("MOZCENTRAL")) { - appConfig.toolbar.openFile.hidden = true; - appConfig.secondaryToolbar.openFileButton.hidden = true; } if (!PDFViewerApplication.supportsDocumentFonts) { diff --git a/web/secondary_toolbar.js b/web/secondary_toolbar.js index 40bfa88bc..e43c5b4d7 100644 --- a/web/secondary_toolbar.js +++ b/web/secondary_toolbar.js @@ -135,7 +135,7 @@ class SecondaryToolbar { close: true, }, ]; - if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) { + if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { this.buttons.push({ element: options.openFileButton, eventName: "openfile", diff --git a/web/toolbar.js b/web/toolbar.js index 8fa02f78b..79f60716a 100644 --- a/web/toolbar.js +++ b/web/toolbar.js @@ -70,7 +70,7 @@ class Toolbar { { element: options.download, eventName: "download" }, { element: options.viewBookmark, eventName: null }, ]; - if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) { + if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { this.buttons.push({ element: options.openFile, eventName: "openfile" }); } this.items = { diff --git a/web/viewer.html b/web/viewer.html index b6d0c83af..cb698cf0f 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -153,7 +153,7 @@ See https://github.com/adobe-type-tools/cmap-resources Presentation Mode - + @@ -267,7 +267,7 @@ See https://github.com/adobe-type-tools/cmap-resources Presentation Mode - + @@ -453,7 +453,7 @@ See https://github.com/adobe-type-tools/cmap-resources
- +