aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/commands.coffee4
-rw-r--r--background_scripts/main.coffee10
2 files changed, 4 insertions, 10 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index e32707ce..50e5d624 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -8,7 +8,7 @@ Commands =
loadKeyMappings: (value) ->
@clearKeyMappingsAndSetDefaults()
@parseCustomKeyMappings value
- @generateKeyStateStructure()
+ @generateKeyStateMapping()
availableCommands: {}
keyToCommandRegistry: {}
@@ -106,7 +106,7 @@ Commands =
# string.
namedKeyRegex: /^(<(?:[amc]-.|(?:[amc]-)?[a-z0-9]{2,5})>)(.*)$/
- generateKeyStateStructure: ->
+ generateKeyStateMapping: ->
keyMapping = {}
for own keys, registryEntry of @keyToCommandRegistry
currentMapping = keyMapping
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index f5bf90a6..d1ca501d 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -369,16 +369,10 @@ chrome.tabs.onUpdated.addListener (tabId, changeInfo, tab) ->
# End action functions
-# Open Vomnibar in tab's main frame.
-openVomnibar = (tabId, frameId, registryEntry) ->
- chrome.tabs.sendMessage tabId,
- name: "openVomnibar"
- sourceFrameId: frameId
- registryEntry: registryEntry
-
runBackgroundCommand = ({frameId, registryEntry, count}, sender) ->
if registryEntry.command.split(".")[0] == "Vomnibar"
- openVomnibar sender.tab.id, frameId, registryEntry
+ chrome.tabs.sendMessage sender.tab.id,
+ name: "openVomnibar", sourceFrameId: frameId, registryEntry: registryEntry
else if registryEntry.passCountToFunction
BackgroundCommands[registryEntry.command] count, frameId
else if registryEntry.noRepeat