diff options
| author | Timo Sand | 2013-02-17 17:23:53 +0000 |
|---|---|---|
| committer | Timo Sand | 2013-02-17 17:23:53 +0000 |
| commit | b406848c2b0605b0765ef12b1469e20e47080a64 (patch) | |
| tree | 8cf5789179a80fc36f8fd77439521230a9423eb8 /background_scripts/main.coffee | |
| parent | c781ce942e225c9bc9f172cea54e0e7de6e4bcd0 (diff) | |
| download | vimium-b406848c2b0605b0765ef12b1469e20e47080a64.tar.bz2 | |
Added functionality to "float" current tab ie. open in new window
Diffstat (limited to 'background_scripts/main.coffee')
| -rw-r--r-- | background_scripts/main.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index d9229f12..912117ff 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()) + openTabInNewWindow: (callback) -> + chrome.tabs.getSelected(null, (tab) -> + chrome.windows.create({tabId: tab.id}) + selectionChangedHandlers.push(callback)) nextTab: (callback) -> selectTab(callback, "next") previousTab: (callback) -> selectTab(callback, "previous") firstTab: (callback) -> selectTab(callback, "first") |
