mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +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
|
@ -62,7 +62,6 @@ class Toolbar {
|
|||
{ element: options.next, eventName: "nextpage" },
|
||||
{ element: options.zoomIn, eventName: "zoomin" },
|
||||
{ element: options.zoomOut, eventName: "zoomout" },
|
||||
{ element: options.openFile, eventName: "openfile" },
|
||||
{ element: options.print, eventName: "print" },
|
||||
{
|
||||
element: options.presentationModeButton,
|
||||
|
@ -71,6 +70,9 @@ class Toolbar {
|
|||
{ element: options.download, eventName: "download" },
|
||||
{ element: options.viewBookmark, eventName: null },
|
||||
];
|
||||
if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) {
|
||||
this.buttons.push({ element: options.openFile, eventName: "openfile" });
|
||||
}
|
||||
this.items = {
|
||||
numPages: options.numPages,
|
||||
pageNumber: options.pageNumber,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue