aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2015-01-02 14:33:18 +0000
committerStephen Blott2015-01-02 14:33:18 +0000
commitd4c43d8f9095325b41544ad7811cc131c1b186f1 (patch)
tree315977670253a084ccc015b1563175e931d217f0 /content_scripts
parent425eb0dd84c1d3bf3eb854bda68140db8c46cb7a (diff)
downloadvimium-d4c43d8f9095325b41544ad7811cc131c1b186f1.tar.bz2
Modes; show keyqueue in badge.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/vimium_frontend.coffee6
1 files changed, 4 insertions, 2 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 7ce3e988..fb6199bf 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -125,7 +125,7 @@ initializePreDomReady = ->
# Overriding updateBadgeForMode() from Mode.updateBadgeForMode().
updateBadgeForMode: (badge) ->
handlerStack.alwaysPropagate =>
- badge.badge ||= @badge
+ badge.badge ||= if keyQueue then keyQueue else @badge
badge.badge = "" unless isEnabledForUrl
# Initialize the scroller. The scroller install a key handler, and this is next on the handler stack,
@@ -165,7 +165,9 @@ initializePreDomReady = ->
Mode.updateBadge()
return { enabled: isEnabledForUrl, passKeys: passKeys }
setState: setState
- currentKeyQueue: (request) -> passKeysMode.setState request
+ currentKeyQueue: (request) ->
+ keyQueue = request.keyQueue
+ passKeysMode.setState request
chrome.runtime.onMessage.addListener (request, sender, sendResponse) ->
# In the options page, we will receive requests from both content and background scripts. ignore those