diff options
| author | mrmr1993 | 2017-10-29 12:08:23 +0000 |
|---|---|---|
| committer | mrmr1993 | 2017-10-29 12:08:23 +0000 |
| commit | 3abee4d80699c1fade78af951efd23c1297d0be3 (patch) | |
| tree | 8a78138e9afc04c0a78ecac85cf4e9c708d3c127 | |
| parent | 722ba99720ed946f11e5672c7fbf0f1f34337576 (diff) | |
| download | vimium-3abee4d80699c1fade78af951efd23c1297d0be3.tar.bz2 | |
Tidy up exports in vimium_frontend
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 3beb96aa..bbc3e4f1 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -283,17 +283,17 @@ focusThisFrame = (request) -> document.activeElement.blur() if document.activeElement.tagName.toLowerCase() == "iframe" flashFrame() if request.highlight -extend root, - lastFocusedInput: do -> - # Track the most recently focused input element. - recentlyFocusedElement = null - window.addEventListener "focus", - forTrusted (event) -> - DomUtils = window.DomUtils ? root.DomUtils # Workaround FF bug 1408996. - if DomUtils.isEditable event.target - recentlyFocusedElement = event.target - , true - -> recentlyFocusedElement +# Used by focusInput command. +root.lastFocusedInput = do -> + # Track the most recently focused input element. + recentlyFocusedElement = null + window.addEventListener "focus", + forTrusted (event) -> + DomUtils = window.DomUtils ? root.DomUtils # Workaround FF bug 1408996. + if DomUtils.isEditable event.target + recentlyFocusedElement = event.target + , true + -> recentlyFocusedElement # Checks if Vimium should be enabled or not in this frame. As a side effect, it also informs the background # page whether this frame has the focus, allowing the background page to track the active frame's URL and set @@ -338,7 +338,7 @@ root.frameId = frameId root.Frame = Frame root.windowIsFocused = windowIsFocused root.bgLog = bgLog -# These are exported for find mode and link-hints mode. +# These are exported for normal mode and link-hints mode. extend root, {focusThisFrame} # These are exported only for the tests. extend root, {installModes} |
