diff --git a/DuckDuckGo/Menus/MainMenu.swift b/DuckDuckGo/Menus/MainMenu.swift index 3a64a76eca..8f6239c825 100644 --- a/DuckDuckGo/Menus/MainMenu.swift +++ b/DuckDuckGo/Menus/MainMenu.swift @@ -319,6 +319,7 @@ import SubscriptionUI NSMenuItem(title: UserText.zoom, action: #selector(NSWindow.performZoom)) NSMenuItem.separator() + NSMenuItem(title: UserText.duplicateTab, action: #selector(MainViewController.duplicateTab)) NSMenuItem(title: UserText.pinTab, action: #selector(MainViewController.pinOrUnpinTab)) NSMenuItem(title: UserText.moveTabToNewWindow, action: #selector(MainViewController.moveTabToNewWindow)) NSMenuItem(title: UserText.mainMenuWindowMergeAllWindows, action: #selector(NSWindow.mergeAllWindows)) diff --git a/DuckDuckGo/Menus/MainMenuActions.swift b/DuckDuckGo/Menus/MainMenuActions.swift index c94b028622..524d4a6d1a 100644 --- a/DuckDuckGo/Menus/MainMenuActions.swift +++ b/DuckDuckGo/Menus/MainMenuActions.swift @@ -601,6 +601,12 @@ extension MainViewController { WindowsManager.openNewWindow(with: tab) } + @objc func duplicateTab(_ sender: Any?) { + guard let (_, index) = getActiveTabAndIndex() else { return } + + tabCollectionViewModel.duplicateTab(at: index) + } + @objc func pinOrUnpinTab(_ sender: Any?) { guard let (_, selectedTabIndex) = getActiveTabAndIndex() else { return }