diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | background_scripts/commands.coffee | 5 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 3 |
3 files changed, 8 insertions, 1 deletions
@@ -74,6 +74,7 @@ Manipulating tabs: x close current tab X restore closed tab (i.e. unwind the 'x' command) T search through your open tabs + . pin/unpin current tab Additional advanced browsing commands: diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index ce159c71..3e30e033 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -100,7 +100,7 @@ Commands = historyNavigation: ["goBack", "goForward"] tabManipulation: - ["nextTab", "previousTab", "firstTab", "lastTab", "createTab", "duplicateTab", "removeTab", "restoreTab", "moveTabToNewWindow"] + ["nextTab", "previousTab", "firstTab", "lastTab", "createTab", "duplicateTab", "removeTab", "restoreTab", "moveTabToNewWindow", "togglePinTab"] misc: ["showHelp"] @@ -170,6 +170,8 @@ defaultKeyMappings = "x": "removeTab" "X": "restoreTab" + ".": "togglePinTab" + "o": "Vomnibar.activate" "O": "Vomnibar.activateInNewTab" @@ -245,6 +247,7 @@ commandDescriptions = removeTab: ["Close current tab", { background: true, noRepeat: true }] restoreTab: ["Restore closed tab", { background: true }] moveTabToNewWindow: ["Move tab to new window", { background: true }] + togglePinTab: ["Pin/unpin current tab", { background: true }] "Vomnibar.activate": ["Open URL, bookmark, or history entry"] "Vomnibar.activateInNewTab": ["Open URL, bookmark, history entry, in a new tab"] diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index f564f477..207cbccb 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -257,6 +257,9 @@ BackgroundCommands = callback())) openCopiedUrlInCurrentTab: (request) -> openUrlInCurrentTab({ url: Clipboard.paste() }) openCopiedUrlInNewTab: (request) -> openUrlInNewTab({ url: Clipboard.paste() }) + togglePinTab: (request) -> + chrome.tabs.getSelected(null, (tab) -> + chrome.tabs.update(tab.id, { pinned: !tab.pinned })) showHelp: (callback, frameId) -> chrome.tabs.getSelected(null, (tab) -> chrome.tabs.sendMessage(tab.id, |
