Merge pull request #11522 from Snuffleupagus/viewer-reportTelemetry
Ensure that the viewer telemetry reporting, and fallback code, runs in development mode and GENERIC builds
This commit is contained in:
commit
ead03b513c
20
web/app.js
20
web/app.js
@ -850,8 +850,8 @@ const PDFViewerApplication = {
|
|||||||
|
|
||||||
fallback(featureId) {
|
fallback(featureId) {
|
||||||
if (
|
if (
|
||||||
typeof PDFJSDev !== "undefined" &&
|
typeof PDFJSDev === "undefined" ||
|
||||||
PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
PDFJSDev.test("MOZCENTRAL || GENERIC")
|
||||||
) {
|
) {
|
||||||
// Only trigger the fallback once so we don't spam the user with messages
|
// Only trigger the fallback once so we don't spam the user with messages
|
||||||
// for one PDF.
|
// for one PDF.
|
||||||
@ -1325,8 +1325,8 @@ const PDFViewerApplication = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof PDFJSDev !== "undefined" &&
|
typeof PDFJSDev === "undefined" ||
|
||||||
PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
PDFJSDev.test("MOZCENTRAL || GENERIC")
|
||||||
) {
|
) {
|
||||||
// Telemetry labels must be C++ variable friendly.
|
// Telemetry labels must be C++ variable friendly.
|
||||||
let versionId = "other";
|
let versionId = "other";
|
||||||
@ -1556,8 +1556,8 @@ const PDFViewerApplication = {
|
|||||||
printService.layout();
|
printService.layout();
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof PDFJSDev !== "undefined" &&
|
typeof PDFJSDev === "undefined" ||
|
||||||
PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
PDFJSDev.test("MOZCENTRAL || GENERIC")
|
||||||
) {
|
) {
|
||||||
this.externalServices.reportTelemetry({
|
this.externalServices.reportTelemetry({
|
||||||
type: "print",
|
type: "print",
|
||||||
@ -1870,8 +1870,8 @@ function webViewerInitialized() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof PDFJSDev !== "undefined" &&
|
(typeof PDFJSDev === "undefined" ||
|
||||||
PDFJSDev.test("FIREFOX || MOZCENTRAL") &&
|
PDFJSDev.test("MOZCENTRAL || GENERIC")) &&
|
||||||
!PDFViewerApplication.supportsDocumentFonts
|
!PDFViewerApplication.supportsDocumentFonts
|
||||||
) {
|
) {
|
||||||
AppOptions.set("disableFontFace", true);
|
AppOptions.set("disableFontFace", true);
|
||||||
@ -1998,8 +1998,8 @@ function webViewerPageRendered(evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
typeof PDFJSDev !== "undefined" &&
|
typeof PDFJSDev === "undefined" ||
|
||||||
PDFJSDev.test("FIREFOX || MOZCENTRAL")
|
PDFJSDev.test("MOZCENTRAL || GENERIC")
|
||||||
) {
|
) {
|
||||||
PDFViewerApplication.externalServices.reportTelemetry({
|
PDFViewerApplication.externalServices.reportTelemetry({
|
||||||
type: "pageInfo",
|
type: "pageInfo",
|
||||||
|
Loading…
Reference in New Issue
Block a user