aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
authornazri2011-04-13 16:35:32 +0800
committerNazri Ramliy2011-07-21 18:36:26 +0800
commit325e8b8e3b31ae2a7379f32e657bdade8a2efe0d (patch)
tree3aa4f8cdfec1f2d96b133288205e98efe8dac422 /linkHints.js
parent4d3c49d662d6e2674e2090d24adffd89745fc990 (diff)
downloadvimium-325e8b8e3b31ae2a7379f32e657bdade8a2efe0d.tar.bz2
Make link hints appear out of order
This has the effect of link hints 'spreading' out after the first key is pressed on a link-heavy page.
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/linkHints.js b/linkHints.js
index e3ecacfb..f4ffc768 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -369,6 +369,12 @@ var alphabetHints = {
var hintStringLength = hintString.length;
for (var i = 0; i < numHintDigits - hintStringLength; i++)
hintString.unshift(settings.get('linkHintCharacters')[0]);
+
+ // Reversing the hint string has the advantage of making the link hints
+ // appear to spread out after the first key is hit. This is helpful on a
+ // page that has http links that are close to each other where link hints
+ // of 2 characters or more occlude each other.
+ hintString.reverse();
return hintString.join("");
},