From 26f91fea40f11c116497ce20c1fe53f3956a922f Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 12 May 2015 06:33:13 +0100 Subject: Fix HUD on options page (temporary fix, v2). Alternative to 7004420e178416cc680416091a23dd804fb9370c. --- content_scripts/hud.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'content_scripts/hud.coffee') diff --git a/content_scripts/hud.coffee b/content_scripts/hud.coffee index dcb95fd9..05fa998d 100644 --- a/content_scripts/hud.coffee +++ b/content_scripts/hud.coffee @@ -11,14 +11,13 @@ HUD = # it doesn't sit on top of horizontal scrollbars like Chrome's HUD does. init: -> - @tween ?= new Tween ".vimiumHUD.vimiumUIComponentVisible" + @tween = new Tween ".vimiumHUD.vimiumUIComponentVisible" showForDuration: (text, duration) -> @show(text) @_showForDurationTimerId = setTimeout((=> @hide()), duration) show: (text) -> - @init() return unless @enabled() clearTimeout(@_showForDurationTimerId) @displayElement().innerText = text @@ -42,7 +41,7 @@ HUD = # If :updateIndicator is truthy, then we also refresh the mode indicator. The only time we don't update the # mode indicator, is when hide() is called for the mode indicator itself. hide: (immediate = false, updateIndicator = true) -> - @init() + return unless @tween? @tween.stop() if immediate unless updateIndicator -- cgit v1.2.3