From 22f0ed9c3c63ecbc4fc2413dc5235a9489d9cf25 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Thu, 12 May 2016 07:21:07 +0100 Subject: Revert "Improves next/previous links by targetting button elements and adding single left/right angle quotation marks" This reverts commit ee8c235aeaf52d2bc867a00c37731690e337c7ff. This reverts #2117. This breaks next/prev on Reddit (it chooses a different link). Reddit is an important site, so we should unwind this for now. Mention @sco-tt. --- CREDITS | 1 - content_scripts/vimium_frontend.coffee | 2 +- lib/settings.coffee | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CREDITS b/CREDITS index 62e79698..b11497ca 100644 --- a/CREDITS +++ b/CREDITS @@ -45,6 +45,5 @@ Contributors: Utkarsh Upadhyay (github: PrestanceDesign) Dahan Gong (github: gdh1995) - Scott Pinkelman (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 07322250..59403344 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", "button", "*[@onclick or @role='link' or contains(@class, 'button')]"]) + linksXPath = DomUtils.makeXPath(["a", "*[@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 92871ee2..70dc1147 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,<,\u2039,\u2190,\xab,\u226a,<<" - # "\bnext\b,\bmore\b,>,›,→,»,≫,>>" - nextPatterns: "next,more,newer,>,\u203a,\u2192,\xbb,\u226b,>>" + # "\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,>>" # default/fall back search engine searchUrl: "https://www.google.com/search?q=" # put in an example search engine -- cgit v1.2.3