summaryrefslogtreecommitdiffstats
path: root/browser/base/content/browser-allTabsMenu.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /browser/base/content/browser-allTabsMenu.js
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/base/content/browser-allTabsMenu.js')
-rw-r--r--browser/base/content/browser-allTabsMenu.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/browser/base/content/browser-allTabsMenu.js b/browser/base/content/browser-allTabsMenu.js
index a9caeffca0..f4b15bc9c3 100644
--- a/browser/base/content/browser-allTabsMenu.js
+++ b/browser/base/content/browser-allTabsMenu.js
@@ -6,6 +6,7 @@
/* eslint-env mozilla/browser-window */
ChromeUtils.defineESModuleGetters(this, {
+ BrowserUsageTelemetry: "resource:///modules/BrowserUsageTelemetry.sys.mjs",
TabsPanel: "resource:///modules/TabsList.sys.mjs",
});
@@ -72,6 +73,16 @@ var gTabsPanel = {
!hasHiddenTabs;
document.getElementById("allTabsMenu-hiddenTabsSeparator").hidden =
!hasHiddenTabs;
+
+ let closeDuplicateEnabled = Services.prefs.getBoolPref(
+ "browser.tabs.context.close-duplicate.enabled"
+ );
+ let closeDuplicateTabsItem = document.getElementById(
+ "allTabsMenu-closeDuplicateTabs"
+ );
+ closeDuplicateTabsItem.hidden = !closeDuplicateEnabled;
+ closeDuplicateTabsItem.disabled =
+ !closeDuplicateEnabled || !gBrowser.getAllDuplicateTabsToClose().length;
});
this.allTabsView.addEventListener("ViewShown", () =>
@@ -149,6 +160,10 @@ var gTabsPanel = {
entrypoint,
1
);
+ BrowserUsageTelemetry.recordInteractionEvent(
+ entrypoint,
+ "all-tabs-panel-entrypoint"
+ );
PanelUI.showSubView(
this.kElements.allTabsView,
this.allTabsButton,