Follow links from inline find in Safari 3

Jul 09, '07 07:30:02AM

Contributed by: merwin

For some reason, the inline find in Safari 3 does not have the feature to follow a link after an inline find. In Firefox, I use this feature a lot to navigate through web pages. A small bookmarklet solves this issue in Safari:

javascript:x=window.getSelection().getRangeAt(0).startContainer.parentNode;if(x.tagName=='A'){window.location=x;}else{window.location=x.parentNode};

Save the oneliner as a bookmarklet in the bookmarks bar. Now you can follow the link after an inline search by simply using the bookmarklet's shortcut (in my case, Command-1). Note that this code is not perfect and may fail in many cases, but it's good enough for me.

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070706092659661