mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
[GeckoView] Show the download button by default and add a pref to disable it (bug 1827963)
For the moment there is no real consensus on how we should download a pdf on Android. Hence we keep this solution for the moment but behind a pref (which will be true on nightly only).
This commit is contained in:
parent
7571842d84
commit
7f0d45ce47
4 changed files with 61 additions and 23 deletions
23
web/app.js
23
web/app.js
|
@ -588,7 +588,17 @@ const PDFViewerApplication = {
|
|||
}
|
||||
|
||||
if (appConfig.toolbar) {
|
||||
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, this.l10n);
|
||||
if (
|
||||
typeof PDFJSDev === "undefined"
|
||||
? window.isGECKOVIEW
|
||||
: PDFJSDev.test("GECKOVIEW")
|
||||
) {
|
||||
if (AppOptions.get("enableFloatingToolbar")) {
|
||||
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, this.l10n);
|
||||
}
|
||||
} else {
|
||||
this.toolbar = new Toolbar(appConfig.toolbar, eventBus, this.l10n);
|
||||
}
|
||||
}
|
||||
|
||||
if (appConfig.secondaryToolbar) {
|
||||
|
@ -2917,17 +2927,6 @@ function webViewerTouchEnd(evt) {
|
|||
}
|
||||
|
||||
function webViewerClick(evt) {
|
||||
if (
|
||||
typeof PDFJSDev === "undefined"
|
||||
? window.isGECKOVIEW
|
||||
: PDFJSDev.test("GECKOVIEW")
|
||||
) {
|
||||
if (
|
||||
document.activeElement === PDFViewerApplication.appConfig.mainContainer
|
||||
) {
|
||||
PDFViewerApplication.toolbar?.toggle();
|
||||
}
|
||||
}
|
||||
if (!PDFViewerApplication.secondaryToolbar?.isOpen) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue