diff options
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index e6951102..03c2277a 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -218,7 +218,10 @@ repeatFunction = (func, totalCount, currentCount, frameId) -> # mapped in commands.coffee. BackgroundCommands = createTab: (callback) -> chrome.tabs.create({ url: "chrome://newtab" }, (tab) -> callback()) - duplicateTab: (callback) -> chrome.tabs.duplicate(chrome.tabs.getCurrent(), (tab) -> callback()) + duplicateTab: (callback) -> + chrome.tabs.getSelected(null, (tab) -> + chrome.tabs.duplicate(tab.id) + selectionChangedHandlers.push(callback)) nextTab: (callback) -> selectTab(callback, "next") previousTab: (callback) -> selectTab(callback, "previous") firstTab: (callback) -> selectTab(callback, "first") |
