From 5a6aad001e9da5bbe891711fd93975980d1e8fc5 Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Sun, 6 Dec 2009 00:57:02 -0800 Subject: Make opening links in the background tab feel a little snappier by removing the feedback timeout. --- linkHints.js | 9 ++++++--- 1 file 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(); -- cgit v1.2.3