philwilson.org

a geek commodity

Use accesskeys for navigating Google search results pages with Greasemonkey

March 17th, 2005 by Phil

The Greasemonkey script: Enables navigation through Google search results pages using ALT+, and ALT+..

This script enables accesskeys for navigating through pages of Google search results using ALT+, for “previous page of results” and ALT+. for “next page of results”. I find it useful, so maybe someone else will too :)

I’ve been using Jesse Rudermans Search Keys Firefox extension since he first released it. It’s brilliant - when you perform a search on any of the listed search engines it inserts the numbers 1-0 after them, and makes them links, so that pressing “1″ will take you to the first result, “2″ the second, and so on. This has proved very useful for me, because I’m quite the keyboard fan, and tend to search Google from the address bar, and then just press the number of the result I want to see.

The problem was that if the result I wanted wasn’t on the first page then I had to grab my mouse and click “Next”, or use find-as-you-type and hope that the word “next”, or “xt” wasn’t in any of the links already there. This script helps me get around that, so that now I have a guaranteed method of moving between pages of the Google search results. Marvellous.

|

15 Responses

  1. This is great, Phil.

    Just wanted to let you know that the first sentence in your post has a typo - it says “Alt+. and Alt+.”. (neither of them is a comma).

    But nice script. I’ll add it to the wiki if it isn’t already there.

    Posted by Aaron on March 17th, 2005 at 6:39 pm
  2. Thanks for that Aaron, I would have fixed it sooner had Blogger actually been responding :)

    Thanks also for adding it to the wiki already! Fast moving!

    Posted by Pip on March 18th, 2005 at 10:46 am
  3. Great! Very cool.

    Posted by Michael on March 20th, 2005 at 8:21 pm
  4. http://www.google.fi has a slightly different web page:
    <img src=/intl/fi/nav_current.gif …
    http://www.google.se has /intl/sv/nav_current.gif…

    With this fix it should work with local googles too:

    “//img[contains(@src,’/nav_current.gif’)”

    Very handy script, btw.

    Posted by clapu on March 25th, 2005 at 1:21 pm
  5. clapu, thanks for spotting that, I’d never have seen it myself! I’ll update the script. Thanks.

    Posted by Pip on April 1st, 2005 at 8:57 am
  6. This is a great script. Works well with AccessBar (i.e. tells you what keys are defined). I have one suggestion:

    In FF, you can turn off the default setting for the Location Bar to make it search google normally instead of the “I’m Feeling Lucky” search.

    The default URL when you type something in is e.g. “keyword:soccer”

    You should include an “@include keyword:*” bit in your code.

    Cheers!

    Posted by Anonymous on April 2nd, 2005 at 12:29 am
  7. Nice work! I was looking all over for something like this.

    Posted by lepton on April 16th, 2005 at 4:36 am
  8. Thanks!

    Posted by Pip on April 16th, 2005 at 5:57 pm
  9. Nice one, used an prev/next extension before but that one was buggy.
    I changed the keys to left Alt+Z and left Alt+X because i still want find-as-you-type.

    Let’s see if i can make some ‘macros’ for webbased applications at work.

    Posted by bredend on May 13th, 2005 at 1:25 pm
  10. Can anyone modify this to use Lexisnexis. i.e. go thru the pages like this google script. If you need some information, like to get into lexis, please email me at Jonathanquinn@gmail.com

    Posted by Anonymous on May 29th, 2005 at 4:39 pm
  11. I kept getting a javascript error:
    Error: a has no properties
    Source File: googleaccesskeys.user.js

    I added the following code right after you set the variable ‘a’ and it seems to have fixed the problem:
    if (!a) {
    return;
    }

    Posted by Anonymous on September 26th, 2005 at 8:47 pm
  12. Ah yes, hadn’t seen that. Should still work though.

    Posted by Pip on September 27th, 2005 at 9:17 am
  13. hi
    I’ve just recently discovered Greasemonkey, and this script would be very useful. Unfortunately, it does not work - I’ve tried it on Windows / Firefox 1.5 at work and on Linux / Firefox 1.5 at home, and nothing happens when I press alt+,/. . Am I missing something or has Google changed their html code? I analyzed html, and script seems to be doing the right think. Any ideas?
    thx

    Posted by Anonymous on August 8th, 2006 at 7:34 pm
  14. Instead of ALT, how do I change it to use CTRL? The ALT key is hard to reach on my Powerbook keyboard.

    Your IP address

    Posted by Anonymous on October 22nd, 2006 at 6:56 pm
  15. This script does not work anymore, everybody who is looking for a working alternative should take a look at the “Add Prev/Next Accesskeys” on userscripts.org
    Direct Link:
    http://userscripts.org/scripts/show/3152

    Posted by Anonymous on October 27th, 2006 at 7:38 pm

Leave a Comment




Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.