aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Crosby2009-12-06 00:57:02 -0800
committerPhil Crosby2009-12-06 00:57:02 -0800
commit5a6aad001e9da5bbe891711fd93975980d1e8fc5 (patch)
tree2220bb0c639dd34a5fae707a64d25e59a85f5c10
parentbdaa3fc11ce6b836959fd7817fe04128d38b601b (diff)
downloadvimium-5a6aad001e9da5bbe891711fd93975980d1e8fc5.tar.bz2
Make opening links in the background tab feel a little snappier by removing the feedback timeout.
-rw-r--r--linkHints.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/linkHints.js b/linkHints.js
index d3f6f14b..e8f1cd3d 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -158,9 +158,12 @@ function updateLinkHints() {
matchedLink.focus();
matchedLink.setSelectionRange(matchedLink.value.length, matchedLink.value.length);
} else {
- // Don't navigate to the selected link immediately; we want to give the user some feedback depicting
- // which link they've selected by focusing it.
- setTimeout(function() { simulateClick(matchedLink); }, 400);
+ // When we're opening the link in the current tab, don't navigate to the selected link immediately;
+ // we want to give the user some feedback depicting which link they've selected by focusing it.
+ if (!shouldOpenLinkHintInNewTab)
+ setTimeout(function() { simulateClick(matchedLink); }, 400);
+ else
+ simulateClick(matchedLink);
matchedLink.focus();
}
deactivateLinkHintsMode();