feat: Added more urlbar commands, b=no-bug, c=workspaces, p=#10417

* feat: Added more urlbar commands, b=no-bug, c=workspaces

Added several new commands to the global actions template:
- Toggle Tabs on Right
- Add to Essentials / Remove from Essentials
- Bookmark This Page / Bookmark All Tabs / Show All Bookmarks
- Find in Page / Translate Page
- View Downloads / History
- Manage Extensions / Customize Toolbar / Clear Recent History
- Create New Profile

* fix: condition for adding to essential

* Update tab icons and remove unused actions

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>

* Add suggestedIndex property to global actions

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>

* Add suggestedIndex to Toggle Tabs action

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>

* Fix quotes in ZenUBGlobalActions.sys.mjs

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>

---------

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
Bibek Bhusal
2025-09-18 16:44:32 +05:45
committed by GitHub
parent e9807343af
commit 23bdc994d4

View File

@@ -100,12 +100,12 @@ const globalActionsTemplate = [
{
label: 'Next Tab',
command: 'Browser:NextTab',
icon: 'chrome://browser/skin/zen-icons/next-tab.svg',
icon: 'chrome://browser/skin/zen-icons/forward.svg',
},
{
label: 'Previous Tab',
command: 'Browser:PrevTab',
icon: 'chrome://browser/skin/zen-icons/previous-tab.svg',
icon: 'chrome://browser/skin/zen-icons/back.svg',
},
{
label: 'Capture Screenshot',
@@ -116,6 +116,46 @@ const globalActionsTemplate = [
},
suggestedIndex: 1,
},
{
label: 'Toggle Tabs on right',
command: 'cmd_zenToggleTabsOnRight',
icon: 'chrome://browser/skin/zen-icons/sidebars-right.svg',
suggestedIndex: 1,
},
{
label: 'Add to Essentials',
command: (window) => window.gZenPinnedTabManager.addToEssentials(window.gBrowser.selectedTab),
isAvailable: (window) => {
return (
window.gZenPinnedTabManager.canEssentialBeAdded(window.gBrowser.selectedTab) &&
!window.gBrowser.selectedTab.hasAttribute('zen-essential')
);
},
icon: 'chrome://browser/skin/zen-icons/essential-add.svg',
suggestedIndex: 1,
},
{
label: 'Remove from Essentials',
command: (window) => window.gZenPinnedTabManager.removeEssentials(window.gBrowser.selectedTab),
isAvailable: (window) => window.gBrowser.selectedTab.hasAttribute('zen-essential'),
icon: 'chrome://browser/skin/zen-icons/essential-remove.svg',
suggestedIndex: 1,
},
{
label: 'Find in Page',
command: 'cmd_find',
icon: 'chrome://browser/skin/zen-icons/search-page.svg',
isAvailable: (window) => {
return isNotEmptyTab(window);
},
suggestedIndex: 1,
},
{
label: 'Manage Extensions',
command: 'Tools:Addons',
icon: 'chrome://browser/skin/zen-icons/extension.svg',
suggestedIndex: 1,
},
];
export const globalActions = globalActionsTemplate.map((action) => ({