diff options
| author | Timo Sand | 2013-02-16 22:09:27 +0000 | 
|---|---|---|
| committer | Timo Sand | 2013-02-16 22:09:27 +0000 | 
| commit | f7c3245778e21570fa4adb9d4f1f7a3723317383 (patch) | |
| tree | c744a023e2721e2170c8230f6c7d1733c2192777 | |
| parent | 6d931314a9cd20a3583da291f1466e3845c6b29f (diff) | |
| download | vimium-f7c3245778e21570fa4adb9d4f1f7a3723317383.tar.bz2 | |
Finalized duplicateTab feature
| -rw-r--r-- | CREDITS | 1 | ||||
| -rw-r--r-- | README.markdown | 1 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 5 | 
3 files changed, 6 insertions, 1 deletions
| @@ -38,5 +38,6 @@ Contributors:    R.T. Lechow <rtlechow@gmail.com> (github: rtlechow)    Wang Ning <daning106@gmail.com> (github:daning)    Werner Laurensse (github: ab3) +  Timo Sand (github: deiga)  Feel free to add real names in addition to GitHub usernames. diff --git a/README.markdown b/README.markdown index d0cabeed..94274ebf 100644 --- a/README.markdown +++ b/README.markdown @@ -70,6 +70,7 @@ Manipulating tabs:      g0         go to the first tab      g$         go to the last tab      t          create tab +    yt         duplicate current tab      x          close current tab      X          restore closed tab (i.e. unwind the 'x' command)      T          search through your open tabs 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") | 
