diff options
| author | Scott Pinkelman | 2016-04-26 15:01:49 -0400 |
|---|---|---|
| committer | Scott Pinkelman | 2016-04-26 15:01:49 -0400 |
| commit | ee8c235aeaf52d2bc867a00c37731690e337c7ff (patch) | |
| tree | f26a00cf3f0f4679dc9b25a2817eeff7e2b663e6 | |
| parent | ef4dcf99f5a68860558db44d0535b4b6091bc6e2 (diff) | |
| download | vimium-ee8c235aeaf52d2bc867a00c37731690e337c7ff.tar.bz2 | |
Improves next/previous links by targetting button elements and adding single left/right angle quotation marks
| -rw-r--r-- | CREDITS | 1 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 2 | ||||
| -rw-r--r-- | lib/settings.coffee | 8 |
3 files changed, 6 insertions, 5 deletions
@@ -45,5 +45,6 @@ Contributors: Utkarsh Upadhyay <musically.ut@gmail.com) (github: musically-ut) Michael Salihi <admin@prestance-informatique.fr> (github: PrestanceDesign) Dahan Gong <gdh1995@qq.com> (github: gdh1995) + Scott Pinkelman <scott@scottpinkelman.com> (github: sco-tt) Feel free to add real names in addition to GitHub usernames. diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index d316da4c..4d081e90 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -543,7 +543,7 @@ followLink = (linkElement) -> # next big thing', and 'more' over 'nextcompany', even if 'next' occurs before 'more' in :linkStrings. # findAndFollowLink = (linkStrings) -> - linksXPath = DomUtils.makeXPath(["a", "*[@onclick or @role='link' or contains(@class, 'button')]"]) + linksXPath = DomUtils.makeXPath(["a", "button", "*[@onclick or @role='link' or contains(@class, 'button')]"]) links = DomUtils.evaluateXPath(linksXPath, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE) candidateLinks = [] diff --git a/lib/settings.coffee b/lib/settings.coffee index 70dc1147..92871ee2 100644 --- a/lib/settings.coffee +++ b/lib/settings.coffee @@ -144,10 +144,10 @@ Settings = # "first/last page", so we put the single bracket first in the pattern string so that it gets searched # for first. - # "\bprev\b,\bprevious\b,\bback\b,<,←,«,≪,<<" - previousPatterns: "prev,previous,back,older,<,\u2190,\xab,\u226a,<<" - # "\bnext\b,\bmore\b,>,→,»,≫,>>" - nextPatterns: "next,more,newer,>,\u2192,\xbb,\u226b,>>" + # "\bprev\b,\bprevious\b,\bback\b,<,‹,←,«,≪,<<" + previousPatterns: "prev,previous,back,older,<,\u2039,\u2190,\xab,\u226a,<<" + # "\bnext\b,\bmore\b,>,›,→,»,≫,>>" + nextPatterns: "next,more,newer,>,\u203a,\u2192,\xbb,\u226b,>>" # default/fall back search engine searchUrl: "https://www.google.com/search?q=" # put in an example search engine |
