From 5327d51946fa86ed494c7b5cd2ba39fb79d8e9e9 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 17 Apr 2016 16:11:57 +0100 Subject: 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. --- content_scripts/mode.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'content_scripts/mode.coffee') diff --git a/content_scripts/mode.coffee b/content_scripts/mode.coffee index 37321660..6508627e 100644 --- a/content_scripts/mode.coffee +++ b/content_scripts/mode.coffee @@ -69,8 +69,7 @@ class Mode # undefined, then the request propagates to the next mode. # The active indicator can also be changed with @setIndicator(). if @options.indicator? - if HUD?.isReady() - if @options.indicator then HUD.show @options.indicator else HUD.hide true, false + if @options.indicator then HUD.show @options.indicator else HUD.hide true, false @passEventToPage else @continueBubbling -- cgit v1.2.3