aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-03-01 13:13:08 +0000
committerStephen Blott2016-03-05 05:40:11 +0000
commit201451d94edefa8c873d417f5f6190d993204b5e (patch)
treeea92cc27965758a611c505d1ac1660a5ef485083 /background_scripts
parentff6d4b92df924b93de4366b1f0e3cc7411ac8065 (diff)
downloadvimium-201451d94edefa8c873d417f5f6190d993204b5e.tar.bz2
Key bindings; move Vomnibar commands back to content scripts.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/commands.coffee14
-rw-r--r--background_scripts/main.coffee5
2 files changed, 8 insertions, 11 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index 25acdc03..4dbcd1cd 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -381,13 +381,13 @@ commandDescriptions =
moveTabRight: ["Move tab to the right", { background: true, passCountToFunction: true }]
# These are background-page commands because all requests go via the background page.
- "Vomnibar.activate": ["Open URL, bookmark, or history entry", { background: true, noRepeat: true }]
- "Vomnibar.activateInNewTab": ["Open URL, bookmark, history entry, in a new tab", { background: true, noRepeat: true }]
- "Vomnibar.activateTabSelection": ["Search through your open tabs", { background: true, noRepeat: true }]
- "Vomnibar.activateBookmarks": ["Open a bookmark", { background: true, noRepeat: true }]
- "Vomnibar.activateBookmarksInNewTab": ["Open a bookmark in a new tab", { background: true, noRepeat: true }]
- "Vomnibar.activateEditUrl": ["Edit the current URL", { background: true, noRepeat: true }]
- "Vomnibar.activateEditUrlInNewTab": ["Edit the current URL and open in a new tab", { background: true, noRepeat: true }]
+ "Vomnibar.activate": ["Open URL, bookmark, or history entry", { noRepeat: true }]
+ "Vomnibar.activateInNewTab": ["Open URL, bookmark, history entry, in a new tab", { noRepeat: true }]
+ "Vomnibar.activateTabSelection": ["Search through your open tabs", { noRepeat: true }]
+ "Vomnibar.activateBookmarks": ["Open a bookmark", { noRepeat: true }]
+ "Vomnibar.activateBookmarksInNewTab": ["Open a bookmark in a new tab", { noRepeat: true }]
+ "Vomnibar.activateEditUrl": ["Edit the current URL", { noRepeat: true }]
+ "Vomnibar.activateEditUrlInNewTab": ["Edit the current URL and open in a new tab", { noRepeat: true }]
nextFrame: ["Cycle forward to the next frame on the page", { background: true, passCountToFunction: true }]
mainFrame: ["Select the tab's main/top frame", { background: true, noRepeat: true }]
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 614b74c0..49199cae 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -370,10 +370,7 @@ chrome.tabs.onUpdated.addListener (tabId, changeInfo, tab) ->
# End action functions
runBackgroundCommand = ({frameId, registryEntry, count}, sender) ->
- if registryEntry.command.startsWith "Vomnibar."
- chrome.tabs.sendMessage sender.tab.id,
- name: "openVomnibar", sourceFrameId: frameId, registryEntry: registryEntry
- else if registryEntry.passCountToFunction
+ if registryEntry.passCountToFunction
BackgroundCommands[registryEntry.command] count, frameId
else if registryEntry.noRepeat
BackgroundCommands[registryEntry.command] frameId