diff options
| author | Stephen Blott | 2016-05-03 06:16:42 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-05-03 06:16:42 +0100 |
| commit | b6c535704816d3016f0feee65322c563824c6a08 (patch) | |
| tree | a57dfe206bbb191ce6637ba8213d5a7c6bc1cba2 | |
| parent | 1597664119a4b3660886f83f81e6ad91a0d7062c (diff) | |
| parent | 7aa53edf5776370b6da7ddfb1dae9e7017693f59 (diff) | |
| download | vimium-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.coffee | 6 |
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 |
