diff options
| author | Tobias Gläßer | 2016-09-23 13:49:31 +0200 |
|---|---|---|
| committer | Tobias Gläßer | 2016-09-23 19:07:51 +0200 |
| commit | d6b5a7c26028951f8bb7feeff8801779f9a8506f (patch) | |
| tree | 0e44c32ad36ea559bf03cb872bb8bb5b20af75a6 /background_scripts | |
| parent | 4b1654f820b645a339f98160a1607c042217bf9d (diff) | |
| download | vimium-d6b5a7c26028951f8bb7feeff8801779f9a8506f.tar.bz2 | |
New feature/command: Mute/unmute tab.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/commands.coffee | 3 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index f865131d..6f7122dd 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -171,6 +171,7 @@ Commands = "lastTab", "duplicateTab", "togglePinTab", + "toggleMuteTab", "removeTab", "restoreTab", "moveTabToNewWindow", @@ -273,6 +274,7 @@ defaultKeyMappings = "X": "restoreTab" "<a-p>": "togglePinTab" + "<a-m>": "toggleMuteTab" "o": "Vomnibar.activate" "O": "Vomnibar.activateInNewTab" @@ -363,6 +365,7 @@ commandDescriptions = moveTabToNewWindow: ["Move tab to new window", { background: true }] togglePinTab: ["Pin/unpin current tab", { background: true, noRepeat: true }] + toggleMuteTab: ["Mute/unmute current tab", { background: true, noRepeat: true }] closeTabsOnLeft: ["Close tabs on the left", {background: true, noRepeat: true}] closeTabsOnRight: ["Close tabs on the right", {background: true, noRepeat: true}] diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 929d5537..6a994707 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -210,6 +210,7 @@ BackgroundCommands = openCopiedUrlInCurrentTab: (request) -> TabOperations.openUrlInCurrentTab extend request, url: Clipboard.paste() openCopiedUrlInNewTab: (request) -> @createTab extend request, url: Clipboard.paste() togglePinTab: ({tab}) -> chrome.tabs.update tab.id, {pinned: !tab.pinned} + toggleMuteTab: ({tab}) -> chrome.tabs.update tab.id, {muted: !tab.muted} moveTabLeft: moveTab moveTabRight: moveTab nextFrame: ({count, frameId, tabId}) -> |
