aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background_page.html8
-rw-r--r--vimiumFrontend.js8
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 = {