Bug 1944016 - Add new strings to tab context menu for switching to/from vertical tabs r=sidebar-reviewers,fluent-reviewers,tabbrowser-reviewers,dao,bolsson,nsharpley

Differential Revision: https://phabricator.services.mozilla.com/D236035
This commit is contained in:
Jonathan Sudiaman
2025-01-29 23:29:40 +00:00
parent bd5942f9f3
commit 70919ebe73
6 changed files with 68 additions and 0 deletions

View File

@@ -8470,6 +8470,17 @@ var TabContextMenu = {
: "close-tabs-to-the-end"
);
// Update context menu item for "Turn (on/off) Vertical Tabs".
const toggleVerticalTabsItem = document.getElementById(
"context_toggleVerticalTabs"
);
document.l10n.setAttributes(
toggleVerticalTabsItem,
gBrowser.tabContainer?.verticalMode
? "tab-context-disable-vertical-tabs"
: "tab-context-enable-vertical-tabs"
);
// Disable "Close Tabs to the Left/Right" if there are no tabs
// preceding/following it.
let noTabsToStart = !gBrowser._getTabsToTheStartFrom(this.contextTab)