diff options
| author | Phil Crosby | 2012-02-15 14:53:04 -0800 |
|---|---|---|
| committer | Phil Crosby | 2012-02-15 14:53:04 -0800 |
| commit | 157bf9163166f9b8b8a78321cf69217cd1975f9c (patch) | |
| tree | 870212d3681ae0ae2dbb71df964e0e5a2fb4397d | |
| parent | a21583edb4a7424ae03a4b7b7313999b04936a6b (diff) | |
| download | vimium-157bf9163166f9b8b8a78321cf69217cd1975f9c.tar.bz2 | |
Fix the hudEnabled logic to work with the new settings framework.
| -rw-r--r-- | background_page.html | 8 | ||||
| -rw-r--r-- | vimiumFrontend.js | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/background_page.html b/background_page.html index b6f277c3..fd7bdb82 100644 --- a/background_page.html +++ b/background_page.html @@ -738,14 +738,6 @@ open(chrome.extension.getURL('test_harnesses/automated.html')); } - /** - * Determines wether the heads up display (HUD) is enabled or not. - * - * This value is configurable via the options page. - */ - function hudEnabled() { - return localStorage['hideHud'] !== "true"; - } </script> </head> </html> diff --git a/vimiumFrontend.js b/vimiumFrontend.js index 44ab1ab4..40efc5f1 100644 --- a/vimiumFrontend.js +++ b/vimiumFrontend.js @@ -1043,7 +1043,7 @@ HUD = { }, show: function(text) { - if (!hudEnabled()) return; + if (!HUD.enabled()) return; clearTimeout(HUD._showForDurationTimerId); HUD.displayElement().innerHTML = text; clearInterval(HUD._tweenId); @@ -1113,7 +1113,11 @@ HUD = { this.isShowing = false; }, - isReady: function() { return document.body != null; } + isReady: function() { return document.body != null; }, + + /* A preference which can be toggled in the Options page. */ + enabled: function() { return settings.get("hideHud") !== "true"; } + }; Tween = { |
