aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2015-01-11 12:19:19 +0000
committerStephen Blott2015-01-11 14:36:33 +0000
commitf76c15c6ae6565c0c08569a127974dfd3383ed88 (patch)
tree945c8405da0ce0ddec6d47cd2e3ce60b6d2698ad /content_scripts
parenta8096d235eae39d309c0ffd74e0d2493ff12dd22 (diff)
downloadvimium-f76c15c6ae6565c0c08569a127974dfd3383ed88.tar.bz2
Modes; tweaks, including more tests.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/mode.coffee9
1 files changed, 4 insertions, 5 deletions
diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee
index 84e3e75c..dd797c46 100644
--- a/content_scripts/mode.coffee
+++ b/content_scripts/mode.coffee
@@ -189,10 +189,9 @@ class Mode
# We're currently installing a new mode. So we'll be updating the badge shortly. Therefore, we can
# suppress badge updates while exiting any existing active singleton. This prevents the badge from
# flickering in some cases.
- Mode.badgeSuppressor.runSuppresed =>
- if singletons[key]
- @log "singleton:", "deactivating #{singletons[key].id}" if @debug
- singletons[key].exit()
+ if singletons[key]
+ @log "singleton:", "deactivating #{singletons[key].id}" if @debug
+ Mode.badgeSuppressor.runSuppresed -> singletons[key].exit()
singletons[key] = @
@onExit => delete singletons[key] if singletons[key] == @
@@ -216,7 +215,7 @@ new class BadgeMode extends Mode
name: "badge"
trackState: true
- # FIXME(smblott) BadgeMode is currently triggering and updateBadge event on every focus event. That's a
+ # FIXME(smblott) BadgeMode is currently triggering an updateBadge event on every focus event. That's a
# lot, considerably more than is necessary. Really, it only needs to trigger when we change frame, or
# when we change tab.
@push