summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base/content/nsContextMenu.js
diff options
context:
space:
mode:
authorGaming4JC <g4jc@bulletmail.org>2018-06-21 20:09:48 -0400
committerGaming4JC <g4jc@bulletmail.org>2018-06-21 20:09:48 -0400
commite3719ec517645a17224d2f3e5d3320ea77952719 (patch)
tree326ff9724e7adc8b33ca9f4da0247457686b41a1 /application/basilisk/base/content/nsContextMenu.js
parente6f765a27070a6b922742e61d0a14dcc2c18baba (diff)
downloadUXP-e3719ec517645a17224d2f3e5d3320ea77952719.tar
UXP-e3719ec517645a17224d2f3e5d3320ea77952719.tar.gz
UXP-e3719ec517645a17224d2f3e5d3320ea77952719.tar.lz
UXP-e3719ec517645a17224d2f3e5d3320ea77952719.tar.xz
UXP-e3719ec517645a17224d2f3e5d3320ea77952719.zip
Remove BrowserUITelemetry from Basilisk application
Diffstat (limited to 'application/basilisk/base/content/nsContextMenu.js')
-rw-r--r--application/basilisk/base/content/nsContextMenu.js62
1 files changed, 0 insertions, 62 deletions
diff --git a/application/basilisk/base/content/nsContextMenu.js b/application/basilisk/base/content/nsContextMenu.js
index 589d670ab..3f77dcb90 100644
--- a/application/basilisk/base/content/nsContextMenu.js
+++ b/application/basilisk/base/content/nsContextMenu.js
@@ -85,9 +85,6 @@ nsContextMenu.prototype = {
// Initialize (disable/remove) menu items.
this.initItems();
-
- // Register this opening of the menu with telemetry:
- this._checkTelemetryForMenu(aXulMenu);
},
hiding: function CM_hiding() {
@@ -1782,65 +1779,6 @@ nsContextMenu.prototype = {
menuItem.label = menuLabel;
menuItem.accessKey = gNavigatorBundle.getString("contextMenuSearch.accesskey");
},
-
- _getTelemetryClickInfo: function(aXulMenu) {
- this._onPopupHiding = () => {
- aXulMenu.ownerDocument.removeEventListener("command", activationHandler, true);
- aXulMenu.removeEventListener("popuphiding", this._onPopupHiding, true);
- delete this._onPopupHiding;
-
- let eventKey = [
- this._telemetryPageContext,
- this._telemetryHadCustomItems ? "withcustom" : "withoutcustom"
- ];
- let target = this._telemetryClickID || "close-without-interaction";
- BrowserUITelemetry.registerContextMenuInteraction(eventKey, target);
- };
- let activationHandler = (e) => {
- // Deal with command events being routed to command elements; figure out
- // what triggered the event (which will have the right e.target)
- if (e.sourceEvent) {
- e = e.sourceEvent;
- }
- // Target should be in the menu (this catches using shortcuts for items
- // not in the menu while the menu is up)
- if (!aXulMenu.contains(e.target)) {
- return;
- }
-
- // Check if this is a page menu item:
- if (e.target.hasAttribute(PageMenuParent.GENERATEDITEMID_ATTR)) {
- this._telemetryClickID = "custom-page-item";
- } else {
- this._telemetryClickID = (e.target.id || "unknown").replace(/^context-/i, "");
- }
- };
- aXulMenu.ownerDocument.addEventListener("command", activationHandler, true);
- aXulMenu.addEventListener("popuphiding", this._onPopupHiding, true);
- },
-
- _getTelemetryPageContextInfo: function() {
- let rv = [];
- for (let k of ["isContentSelected", "onLink", "onImage", "onCanvas", "onVideo", "onAudio",
- "onTextInput"]) {
- if (this[k]) {
- rv.push(k.replace(/^(?:is|on)(.)/, (match, firstLetter) => firstLetter.toLowerCase()));
- }
- }
- if (!rv.length) {
- rv.push('other');
- }
-
- return JSON.stringify(rv);
- },
-
- _checkTelemetryForMenu: function(aXulMenu) {
- this._telemetryClickID = null;
- this._telemetryPageContext = this._getTelemetryPageContextInfo();
- this._telemetryHadCustomItems = this.hasPageMenu;
- this._getTelemetryClickInfo(aXulMenu);
- },
-
createContainerMenu: function(aEvent) {
return createUserContextMenu(aEvent, true,
gContextMenuContentData.userContextId);