Add some telemetry to know how often the buttons in the secondary toolbar are used (bug 1789883)

This commit is contained in:
Calixte Denizet 2022-09-08 19:23:41 +02:00
parent b0a021d2cc
commit 05e4aed787
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) {
@ -2910,6 +2911,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