Merge pull request #15416 from calixteman/buttons_telemetry

Add some telemetry to know how often the buttons in the secondary toolbar are used (bug 1789883)
This commit is contained in:
calixteman 2022-09-12 13:59:45 +02:00 committed by GitHub
commit 2d1d64b214
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -613,7 +613,8 @@ const PDFViewerApplication = {
this.secondaryToolbar = new SecondaryToolbar(
appConfig.secondaryToolbar,
eventBus
eventBus,
this.externalServices
);
if (this.supportsFullscreen) {
@ -2917,6 +2918,10 @@ function webViewerKeyDown(evt) {
case 80: // p
PDFViewerApplication.requestPresentationMode();
handled = true;
PDFViewerApplication.externalServices.reportTelemetry({
type: "buttons",
data: { id: "presentationModeKeyboard" },
});
break;
case 71: // g
// focuses input#pageNumber field