Presented by edvakf

Hit-a-Hint Bookmarklet Generator

What's this page?

Hit-a-Hint was a nifty Firefox Addon that makes it super easy to select links with keyboard only.

Now I added full support for Firefox!! That is, this bookmarklet should work on Firefox 3.0 or above as well as Opera 9.5 or above.

Blog posts about this page:
http://d.hatena.ne.jp/edvakf/20081021/1224571807 (Japanese)
http://my.opera.com/edvakf/blog/2008/10/21/improved-hit-a-hint-bookmarklet-with-your-keybind (English)

Hit-a-Hint bookmarklet for Opera

Usage

Create a Hit-a-Hint by selecting the below options. The default is set as my own setting, which is pretty smooth already, but you are free to set your own keybind. Some non-standard or non-alphabetical keys may behave weirdly. As far as I tested, the options indicated below look ok.

When you are done with selections, press the Make Bookmarklet button below, and the bookmarklet link will appear. You can then right click on it, copy the link address, and use it just as any other bookmarklets.

My suggestion, if you are using Opera, is that save it as a bookmark and give it a nickname, say "hitahint". When it's done, go to advanced setting and add the shortcut;

Go to page, "hitahint"

for any key you like.

While hints are drawn, the browser will wait for the keys you choose below. Typing any other keys will remove the hints and bring the browser to the normal state.

Create

To use this, you must enable JavaScript.

Hint Keys:

Letters used for hints. (Please avoid backslash, single- and double-quotations. Other keys including numbers should work in theory, but I only tested with alphabetical keys.)

Open Key:

Key for "opening" the link, that is, if you select only one link then open it in the same page, if more than one then open it in new tabs. Pressing shift, ctrl or alt key with this key forces the link to open in new tab. (I recommend you keep this as "Enter", because Opera can open links in background tabs by pressing shift+ctrl together with Enter)

Enter Quote Doublequote Space Tab Backslash Backspace Delete Escape, or else type in here

Click Key:

Key that emulates normal "click" on the first element you select. This enables you to focus on input boxed, clicking javascript links, etc. Hints that can be "clicked" by this key are indicated with a different color (choose below). Hitting this key on a normal link opens that link just like with normal click. Any hints selected after the first are ignored by this key.

Enter Quote Doublequote Space Tab Backslash Backspace Delete Escape, or else type in here

Separator Key:

The letter that separates each hint you select. The hints are selected automaticaclly when your typed hint uniquely matches one of the hints displayed, otherwise you have to press this key to "select" that hint and choose next.

Enter Quote Doublequote Space Tab Backslash Backspace Delete Escape, or else type in here

Backspace Key:

Key to "unselect" the last choice.

Enter Quote Doublequote Space Tab Backslash Backspace Delete Escape, or else type in here

Link Color:

Hint color for normal links.
a

Clickable Element Color:

Hint color for clickable elements.
a

Selected Hint Color:

Hint color when it's selected.
a

Supplementary User JavaScript

These User JavaScirpts are not neccesary for the Hit-a-Hint bookmarklet. But they work very well together with it.

Accelerate hint drawing

Drawing hints is slow for the first time used in a page. This UserJS adds a style element on a page, which speeds up drawing of hints, in other words, you are always ready to Hit-a-Hint! (Supports the colors you picked above.)
HaH-accelerator.js

Kill page keyboard shortcuts

This UserJS prevents the keyboard shortcuts determined by page scripts while Hit-a-Hint is on.
HaH-kill-page-shortcuts.js

Disable focusing on textboxes when a pages is opened.

No more annoying pre-focus business.
disable-onload-focus.js

Release Information

2008-10-21: ver. 1.0
Release
2008-10-23: ver. 1.01
Bug fix (Thanks tyoro for reporting)
2008-11-10: ver. 1.1
Fixed XPath evaluation wrapper to handle multi-namespace document.
Added limited support for Firefox (Hitting click key for radio buttons, etc, does not emulate click, but only focuses on the element. Thanks Griever)
2008-12-19: ver. 2.0
Added support for an extention by UserJS
Added complete support for Firefox
2008-12-21: ver. 2.1
Bug fix for Firefox (Thaks CoolDriver)
2008-12-31: ver. 2.2
Fixed problem where color addition to a hint element by UserJS was not working
inserted by FC2 system