diff options
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 912117ff..431d84be 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -218,10 +218,13 @@ repeatFunction = (func, totalCount, currentCount, frameId) -> # mapped in commands.coffee. BackgroundCommands = createTab: (callback) -> chrome.tabs.create({ url: "chrome://newtab" }, (tab) -> callback()) - openTabInNewWindow: (callback) -> + duplicateTab: (callback) -> chrome.tabs.getSelected(null, (tab) -> - chrome.windows.create({tabId: tab.id}) + chrome.tabs.duplicate(tab.id) selectionChangedHandlers.push(callback)) + moveTabToNewWindow: (callback) -> + chrome.tabs.getSelected(null, (tab) -> + chrome.windows.create({tabId: tab.id})) nextTab: (callback) -> selectTab(callback, "next") previousTab: (callback) -> selectTab(callback, "previous") firstTab: (callback) -> selectTab(callback, "first") @@ -478,6 +481,8 @@ checkKeyQueue = (keysToCheck, tabId, frameId) -> else if registryEntry.passCountToFunction BackgroundCommands[registryEntry.command](count) + else if registryEntry.noRepeat + BackgroundCommands[registryEntry.command]() else repeatFunction(BackgroundCommands[registryEntry.command], count, 0, frameId) |
