aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJez Ng2012-08-21 00:24:37 -0700
committerJez Ng2012-08-21 00:24:37 -0700
commit77e1f226003a696520b364650db20b308e4b71c0 (patch)
tree84432aa5bb24cfbf61212daca52e88d34ea97a79
parentb31fd43f093e89fbc8bb075451c6e436625fb0f5 (diff)
downloadvimium-77e1f226003a696520b364650db20b308e4b71c0.tar.bz2
Don't follow prev/next links without an exact word match.
Closes #617.
-rw-r--r--content_scripts/vimium_frontend.coffee8
1 files changed, 0 insertions, 8 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 4de0a695..5b7a7402 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -788,20 +788,12 @@ findAndFollowLink = (linkStrings) ->
)
.filter((a) -> wordCount(a) <= wordCount(candidateLinks[0]) + 1)
- # try to get exact word matches first
for linkString in linkStrings
for candidateLink in candidateLinks
exactWordRegex = new RegExp("\\b" + linkString + "\\b", "i")
if (exactWordRegex.test(candidateLink.innerText))
followLink(candidateLink)
return true
-
- for linkString in linkStrings
- for candidateLink in candidateLinks
- if (candidateLink.innerText.toLowerCase().indexOf(linkString) != -1)
- followLink(candidateLink)
- return true
-
false
findAndFollowRel = (value) ->