diff options
| author | Stephen Blott | 2015-03-17 14:29:12 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2015-03-17 14:29:16 +0000 | 
| commit | b65f285aa65b2cfbdaefb4d7c445dbd5e684fbbf (patch) | |
| tree | bdec268c2669870025c4b0f25f1e733d51de8120 | |
| parent | 71d33fdeaa5c081de5041a6a0909d452e1564633 (diff) | |
| download | vimium-b65f285aa65b2cfbdaefb4d7c445dbd5e684fbbf.tar.bz2 | |
Activate vomnibar in window.top; more clean up.
Clean up, and fixes following code review from @mrmr1993.
| -rw-r--r-- | background_scripts/main.coffee | 1 | ||||
| -rw-r--r-- | content_scripts/ui_component.coffee | 2 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 7 | 
3 files changed, 5 insertions, 5 deletions
| diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 05fad941..a64c7e37 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -657,7 +657,6 @@ handleFrameFocused = (request, sender) ->    if frameIdsForTab[tabId]?      frameIdsForTab[tabId] =        [request.frameId, (frameIdsForTab[tabId].filter (id) -> id != request.frameId)...] -  console.log frameIdsForTab[tabId]    # Inform all frames that a frame has received the focus.    chrome.tabs.sendMessage sender.tab.id,       name: "frameFocused" diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index 727f6c27..ee74c3a8 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -20,7 +20,7 @@ class UIComponent      # other UI components.      chrome.runtime.onMessage.addListener (request) =>        @postMessage "hide" if @showing and request.name == "frameFocused" and request.focusFrameId != frameId -      false # Free up response handler. +      false # Free up the sendResponse handler.    # Open a port and pass it to the iframe via window.postMessage.    openPort: -> diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index dccdfe76..11ef30cc 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -94,10 +94,10 @@ settings =  #  # Give this frame a unique id.  # -window.frameId = Math.floor(Math.random()*999999999) +frameId = Math.floor(Math.random()*999999999)  # For debugging only. This logs to the console on the background page. -window.bgLog = (args...) -> +bgLog = (args...) ->    args = (arg.toString() for arg in args)    chrome.runtime.sendMessage handler: "log", frameId: frameId, message: args.join " " @@ -271,7 +271,7 @@ executePageCommand = (request) ->    if request.command.split(".")[0] == "Vomnibar"      if DomUtils.isTopFrame()        # We pass the frameId from request.  That's the frame which originated the request, so that's the frame -      # that needs to receive the focus when we're done. +      # which whould receive the focus when the vomnibar closes.        Utils.invokeCommandString request.command, [ request.frameId ]        refreshCompletionKeys request      return @@ -1238,3 +1238,4 @@ root.settings = settings  root.HUD = HUD  root.handlerStack = handlerStack  root.frameId = frameId +root.bgLog = bgLog | 
