aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/vimium_frontend.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-04-17 16:11:57 +0100
committerStephen Blott2016-04-17 16:11:57 +0100
commit5327d51946fa86ed494c7b5cd2ba39fb79d8e9e9 (patch)
treeae04f84ab4ef959e9b403af9aa1c0b0da1d13c7c /content_scripts/vimium_frontend.coffee
parent12350784fc45998819ef92d6b5badf03e99128ae (diff)
downloadvimium-5327d51946fa86ed494c7b5cd2ba39fb79d8e9e9.tar.bz2
Do not init() the HUD until it's needed.
This avoids initializing around 15 (almost all unused) HUDs on sites like GMail and Google inbox. Because the HUD is small, there is not noticable flicker.
Diffstat (limited to 'content_scripts/vimium_frontend.coffee')
-rw-r--r--content_scripts/vimium_frontend.coffee3
1 files changed, 1 insertions, 2 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index f20bba7e..312c6bbe 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -142,7 +142,6 @@ initializeOnEnabledStateKnown = Utils.makeIdempotent ->
installModes()
initializeUIComponents = Utils.makeIdempotent -> DomUtils.documentReady ->
- HUD.init()
Vomnibar.init() if DomUtils.isTopFrame()
#
@@ -462,7 +461,7 @@ checkIfEnabledForUrl = do ->
initializeUIComponents() if frameIsFocused
else
# Hide the HUD if we're not enabled.
- HUD.hide() if HUD.isReady()
+ HUD.hide true, false # Immediate, do not update indicator.
(frameIsFocused = windowIsFocused()) ->
Frame.postMessage "isEnabledForUrl", {frameIsFocused, url: window.location.toString()}