From e347a3735d30a1a596c0b1958d584b07d79e399f Mon Sep 17 00:00:00 2001 From: Scott Pinkelman Date: Sun, 1 May 2016 10:26:09 -0400 Subject: Make findAndFollowLink look at element values so can be used for next/prev links --- content_scripts/vimium_frontend.coffee | 6 ++++-- 1 file 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 -- cgit v1.2.3