diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /browser/base/content/browser-allTabsMenu.js | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-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.js | 15 |
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, |