aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-08-24 17:05:05 +0100
committerStephen Blott2014-08-24 17:05:05 +0100
commitb599492ea27c8c6bab38e87ef343968f5fcf58e7 (patch)
tree2d79e0028cc1ba8eab7205a9fd5f6c2cef0cdae5
parentfb25935bec26066a457468ae5402f71de4694b37 (diff)
downloadvimium-b599492ea27c8c6bab38e87ef343968f5fcf58e7.tar.bz2
Fix passKeys bug introduced in commit 700d35a
-rw-r--r--background_scripts/main.coffee1
-rw-r--r--content_scripts/vimium_frontend.coffee3
2 files changed, 2 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 5412ead5..dda1beae 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -389,6 +389,7 @@ updateActiveState = (tabId) ->
partialIcon = "icons/browser_action_partial.png"
chrome.tabs.get tabId, (tab) ->
chrome.tabs.sendMessage tabId, { name: "getActiveState" }, (response) ->
+ console.log response
if response
isCurrentlyEnabled = response.enabled
currentPasskeys = response.passKeys
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 2bdd85a8..137b9d1a 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -125,12 +125,11 @@ initializePreDomReady = ->
chrome.runtime.onMessage.addListener (request, sender, sendResponse) ->
# In the options page, we will receive requests from both content and background scripts. ignore those
# from the former.
- console.log request.name, request
return if sender.tab and not sender.tab.url.startsWith 'chrome-extension://'
return unless isEnabledForUrl or request.name == 'getActiveState' or request.name == 'setState'
# These requests are delivered to the options page, but there are no handlers there.
return if request.handler == "registerFrame" or request.handler == "frameFocused"
- requestHandlers[request.name](request, sender)
+ sendResponse requestHandlers[request.name](request, sender)
false
# Wrapper to install event listeners. Syntactic sugar.