aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/ui_component.coffee2
-rw-r--r--content_scripts/vimium_frontend.coffee7
2 files changed, 5 insertions, 4 deletions
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