aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-05-03 06:16:42 +0100
committerStephen Blott2016-05-03 06:16:42 +0100
commitb6c535704816d3016f0feee65322c563824c6a08 (patch)
treea57dfe206bbb191ce6637ba8213d5a7c6bc1cba2
parent1597664119a4b3660886f83f81e6ad91a0d7062c (diff)
parent7aa53edf5776370b6da7ddfb1dae9e7017693f59 (diff)
downloadvimium-b6c535704816d3016f0feee65322c563824c6a08.tar.bz2
Merge pull request #2122 from sco-tt/master
Make findAndFollowLink look at element values so <input> can be used …
-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..9dd68278 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?.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