diff options
| author | Stephen Blott | 2015-03-07 16:49:32 +0000 | 
|---|---|---|
| committer | Stephen Blott | 2015-03-07 16:58:02 +0000 | 
| commit | b05276ed8264e5a71f20a7068690ba2a414ee6d8 (patch) | |
| tree | 9c96d165dd536f696a1f0e5638ba9ca5f4c34cb1 /content_scripts | |
| parent | ae60abb94665446200db8a750bbc1362895d04d2 (diff) | |
| download | vimium-b05276ed8264e5a71f20a7068690ba2a414ee6d8.tar.bz2 | |
Reload content scripts after install/update.
This is @mrmr1993's work from #1041.
Reload content scripts when vimium is installed or updates.
(@mrmr1993:  The automatic merge was really messy (or, at least, I
couldn't figure out what was going on).  Since the bulk of #1041 was
actually quite compact, I took the liberty of just copying it in.  Hope
you don't mind.)
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index b2d9f735..66922084 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -210,6 +210,7 @@ window.initializeWhenEnabled = ->      for type in [ "keydown", "keypress", "keyup", "click", "focus", "blur", "mousedown" ]        do (type) -> installListener window, type, (event) -> handlerStack.bubbleEvent type, event      installListener document, "DOMActivate", (event) -> handlerStack.bubbleEvent 'DOMActivate', event +    installListener document, "focus", detectFocus      installedListeners = true      FindModeHistory.init() @@ -229,7 +230,7 @@ getActiveState = ->  #  # The backend needs to know which frame has focus.  # -window.addEventListener "focus", -> +detectFocus = ->    # settings may have changed since the frame last had focus    settings.load()    chrome.runtime.sendMessage({ handler: "frameFocused", frameId: frameId })  | 
