aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Pinkelman2016-05-01 10:26:09 -0400
committerScott Pinkelman2016-05-01 10:26:09 -0400
commite347a3735d30a1a596c0b1958d584b07d79e399f (patch)
tree9590babbdb6086c1ee52934114c7e6144749565b
parent1597664119a4b3660886f83f81e6ad91a0d7062c (diff)
downloadvimium-e347a3735d30a1a596c0b1958d584b07d79e399f.tar.bz2
Make findAndFollowLink look at element values so <input> can be used for next/prev links
-rw-r--r--content_scripts/vimium_frontend.coffee6
1 files changed, 4 insertions, 2 deletions
diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee
index 4d081e90..6de17ec5 100644
--- a/content_scripts/vimium_frontend.coffee
+++ b/content_scripts/vimium_frontend.coffee
@@ -563,7 +563,8 @@ findAndFollowLink = (linkStrings) ->
linkMatches = false
for linkString in linkStrings
- if (link.innerText.toLowerCase().indexOf(linkString) != -1)
+ if (link.innerText.toLowerCase().indexOf(linkString) != -1 || link.value &&
+ link.value.indexOf(linkString) != -1)
linkMatches = true
break
continue unless linkMatches
@@ -595,7 +596,8 @@ findAndFollowLink = (linkStrings) ->
else
new RegExp linkString, "i"
for candidateLink in candidateLinks
- if (exactWordRegex.test(candidateLink.innerText))
+ if (exactWordRegex.test(candidateLink.innerText) ||
+ candidateLink.value && exactWordRegex.test(candidateLink.value))
followLink(candidateLink)
return true
false