mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Stop bundling the openFile-buttons in the MOZCENTRAL build
Note how both of the openFile-buttons are always hidden during viewer initialization in the MOZCENTRAL build, i.e. the *built-in* Firefox PDF Viewer. Despite that we still include HTML, CSS, and JavaScript code for these buttons in the build. This patch *reduces* the size of the `gulp mozcentral` output by `1679` bytes, which isn't a lot but still cannot hurt.
This commit is contained in:
parent
2be19e828f
commit
b04c373362
7 changed files with 32 additions and 9 deletions
|
@ -65,7 +65,6 @@ class SecondaryToolbar {
|
|||
eventName: "presentationmode",
|
||||
close: true,
|
||||
},
|
||||
{ element: options.openFileButton, eventName: "openfile", close: true },
|
||||
{ element: options.printButton, eventName: "print", close: true },
|
||||
{ element: options.downloadButton, eventName: "download", close: true },
|
||||
{ element: options.viewBookmarkButton, eventName: null, close: true },
|
||||
|
@ -141,6 +140,13 @@ class SecondaryToolbar {
|
|||
close: true,
|
||||
},
|
||||
];
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
this.buttons.push({
|
||||
element: options.openFileButton,
|
||||
eventName: "openfile",
|
||||
close: true,
|
||||
});
|
||||
}
|
||||
this.items = {
|
||||
firstPage: options.firstPageButton,
|
||||
lastPage: options.lastPageButton,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue