aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Crosby2012-02-15 14:45:15 -0800
committerPhil Crosby2012-02-15 14:45:15 -0800
commita21583edb4a7424ae03a4b7b7313999b04936a6b (patch)
treedc821757ba20274915c04c0e6c16ccdd31adf9f4
parent1715afe676ac0fdfb979de318c3f53dc72ca9d0d (diff)
parent214cefc96d8b08f5dc62b6eee372d12cb2c62b55 (diff)
downloadvimium-a21583edb4a7424ae03a4b7b7313999b04936a6b.tar.bz2
Merge pull request #466 from fernandezpablo85/master
Allow users to hide HUD
-rw-r--r--background_page.html9
-rw-r--r--options.html15
-rw-r--r--vimiumFrontend.js1
3 files changed, 24 insertions, 1 deletions
diff --git a/background_page.html b/background_page.html
index 706aeb1f..b6f277c3 100644
--- a/background_page.html
+++ b/background_page.html
@@ -737,6 +737,15 @@
function runTests() {
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/options.html b/options.html
index 037aabbc..4ca2dbda 100644
--- a/options.html
+++ b/options.html
@@ -89,7 +89,7 @@
var defaultSettings = chrome.extension.getBackgroundPage().settings.defaults;
var editableFields = ["scrollStepSize", "excludedUrls", "linkHintCharacters", "userDefinedLinkHintCss",
- "keyMappings", "filterLinkHints", "previousPatterns", "nextPatterns"];
+ "keyMappings", "filterLinkHints", "previousPatterns", "nextPatterns", "hideHud"];
var canBeEmptyFields = ["excludedUrls", "keyMappings", "userDefinedLinkHintCss"];
@@ -308,6 +308,19 @@
<input id="nextPatterns" type="text" style="width:320px" />
</td>
</tr>
+ <tr class="advancedOption">
+ <td class="caption">Hide HUD notifications</td>
+ <td verticalAlign="top" class="booleanOption">
+ <label>
+ <div class="help">
+ <div class="example">
+ Hide the notification HUD that appears on the bottom of the screen.
+ </div>
+ </div>
+ <input id="hideHud" type="checkbox"/>
+ </label>
+ </td>
+ </tr>
</table>
<div id="buttonsPanel">
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index b26f4dd2..44ab1ab4 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -1043,6 +1043,7 @@ HUD = {
},
show: function(text) {
+ if (!hudEnabled()) return;
clearTimeout(HUD._showForDurationTimerId);
HUD.displayElement().innerHTML = text;
clearInterval(HUD._tweenId);