mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-25 22:26:11 +00:00
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:
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user