diff options
| author | Stephen Blott | 2014-08-24 12:10:28 +0100 |
|---|---|---|
| committer | Stephen Blott | 2014-08-24 12:10:28 +0100 |
| commit | 5cdeb4d4ac2bc3171b47043f0275d0f8331486a6 (patch) | |
| tree | ff660ab245b2763b653329d0a3fb7447269c5704 | |
| parent | 700d35a1c4ef85f97f3176aa87807f9a586bf441 (diff) | |
| download | vimium-5cdeb4d4ac2bc3171b47043f0275d0f8331486a6.tar.bz2 | |
Do not call handlers which do not exist (fixed, again).
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 5731838c..2bdd85a8 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -123,12 +123,13 @@ initializePreDomReady = -> currentKeyQueue: (request) -> keyQueue = request.keyQueue chrome.runtime.onMessage.addListener (request, sender, sendResponse) -> - # in the options page, we will receive requests from both content and background scripts. ignore those + # 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' - # registerFrame requests are delivered here, but there's no handler. - return if request.handler == "registerFrame" + # 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) false |
