aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/main.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts/main.coffee')
-rw-r--r--background_scripts/main.coffee4
1 files changed, 4 insertions, 0 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index d9229f12..03c2277a 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -218,6 +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.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")