diff --git a/browser/extensions/report-site-issue/background.js b/browser/extensions/report-site-issue/background.js index 23b6afdfde7a..146e9b409b63 100644 --- a/browser/extensions/report-site-issue/background.js +++ b/browser/extensions/report-site-issue/background.js @@ -17,8 +17,6 @@ const Config = { const FRAMEWORK_KEYS = ["hasFastClick", "hasMobify", "hasMarfeel"]; -browser.pageActionExtras.setLabelForHistogram("webcompat"); - browser.helpMenu.onHelpMenuCommand.addListener(tab => { return getWebCompatInfoForTab(tab).then( info => { @@ -156,14 +154,6 @@ function stripNonASCIIChars(str) { return str.replace(/[^\x00-\x7F]/g, ""); } -browser.l10n - .getMessage("wc-reporter.label2") - .then(browser.pageActionExtras.setDefaultTitle, () => {}); - -browser.l10n - .getMessage("wc-reporter.tooltip") - .then(browser.pageActionExtras.setTooltipText, () => {}); - async function openWebCompatTab(compatInfo) { const url = new URL(Config.newIssueEndpoint); const { details } = compatInfo; diff --git a/browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.js b/browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.js deleted file mode 100644 index 19ee738a6098..000000000000 --- a/browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.js +++ /dev/null @@ -1,43 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -/* global ExtensionAPI */ - -this.pageActionExtras = class extends ExtensionAPI { - getAPI(context) { - const extension = context.extension; - const pageActionAPI = extension.apiManager.getAPI( - "pageAction", - extension, - context.envType - ); - const { - Management: { - global: { windowTracker }, - }, - } = ChromeUtils.import("resource://gre/modules/Extension.jsm", null); - return { - pageActionExtras: { - async setDefaultTitle(title) { - pageActionAPI.action.getContextData(null).title = title; - // Make sure the new default title is considered right away - for (const window of windowTracker.browserWindows()) { - const tab = window.gBrowser.selectedTab; - if (pageActionAPI.action.isShownForTab(tab)) { - pageActionAPI.updateButton(window); - } - } - }, - async setLabelForHistogram(label) { - pageActionAPI.browserPageAction._labelForHistogram = label; - }, - async setTooltipText(text) { - pageActionAPI.browserPageAction.setTooltip(text); - }, - }, - }; - } -}; diff --git a/browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.json b/browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.json deleted file mode 100644 index df848e439a63..000000000000 --- a/browser/extensions/report-site-issue/experimentalAPIs/pageActionExtras.json +++ /dev/null @@ -1,41 +0,0 @@ -[ - { - "namespace": "pageActionExtras", - "description": "experimental pageAction API extensions", - "functions": [ - { - "name": "setDefaultTitle", - "type": "function", - "async": true, - "description": "Set the page action's title for all tabs", - "parameters": [{ - "name": "title", - "type": "string", - "description": "title" - }] - }, - { - "name": "setLabelForHistogram", - "type": "function", - "async": true, - "description": "Set the page action's label for telemetry histograms", - "parameters": [{ - "name": "label", - "type": "string", - "description": "label for the histogram" - }] - }, - { - "name": "setTooltipText", - "type": "function", - "async": true, - "description": "Set the page action's tooltip text", - "parameters": [{ - "name": "text", - "type": "string", - "description": "text" - }] - } - ] - } -] diff --git a/browser/extensions/report-site-issue/manifest.json b/browser/extensions/report-site-issue/manifest.json index a5fc38d2f6ad..454b851b5a1c 100644 --- a/browser/extensions/report-site-issue/manifest.json +++ b/browser/extensions/report-site-issue/manifest.json @@ -43,14 +43,6 @@ "paths": [["l10n"]] } }, - "pageActionExtras": { - "schema": "experimentalAPIs/pageActionExtras.json", - "parent": { - "scopes": ["addon_parent"], - "script": "experimentalAPIs/pageActionExtras.js", - "paths": [["pageActionExtras"]] - } - }, "tabExtras": { "schema": "experimentalAPIs/tabExtras.json", "parent": { diff --git a/browser/extensions/report-site-issue/moz.build b/browser/extensions/report-site-issue/moz.build index 17a2ea1c7642..404861c6c4c7 100644 --- a/browser/extensions/report-site-issue/moz.build +++ b/browser/extensions/report-site-issue/moz.build @@ -23,8 +23,6 @@ FINAL_TARGET_FILES.features["webcompat-reporter@mozilla.org"].experimentalAPIs + "experimentalAPIs/helpMenu.json", "experimentalAPIs/l10n.js", "experimentalAPIs/l10n.json", - "experimentalAPIs/pageActionExtras.js", - "experimentalAPIs/pageActionExtras.json", "experimentalAPIs/tabExtras.js", "experimentalAPIs/tabExtras.json", ]