diff options
| author | Stephen Blott | 2015-01-04 07:21:05 +0000 |
|---|---|---|
| committer | Stephen Blott | 2015-01-04 07:21:05 +0000 |
| commit | 615f8a79f91f1d868465a6dae903c6710103515f (patch) | |
| tree | a638058c897bb9bdf11a51a491dd586494d4188f | |
| parent | f165fb17bfacf5c7c1b51566a0a8583609d3acf0 (diff) | |
| download | vimium-615f8a79f91f1d868465a6dae903c6710103515f.tar.bz2 | |
Modes; update badge on focus change.
| -rw-r--r-- | content_scripts/mode.coffee | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 01427914..64001eaa 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -60,6 +60,10 @@ class Mode func() mode.exit() +# We need to detect when the focused frame/tab changes, and update the badge. +handlerStack.push + "focus": -> handlerStack.alwaysContinueBubbling -> Mode.updateBadge() + # A SingletonMode is a Mode of which there may be at most one instance (of @singleton) active at any one time. # New instances cancel previous instances on startup. class SingletonMode extends Mode @@ -116,5 +120,4 @@ class ConstrainedMode extends Mode root = exports ? window root.Mode = Mode root.SingletonMode = SingletonMode -root.MultiMode = MultiMode root.ConstrainedMode = ConstrainedMode |
