slayeroffice - web experiments gone horribly awry

02.10.2004 - Text To Link

I was clicking around on some development blogs last night and wound up on Dave has some pretty neat stuff there -- I highly recommend giving it a look.

While there I stumbled into his favelets/bookmarklets section and saw that he had a pretty cool one that would allow you to highlight a static URL string on a page, activate the favelet and go to the URL that you had highlighted.

That got me thinking of how it could be done without having to highlight it first, which in turn got me to thinking of how you could turn any and all static urls on a page into working links, which then got me embroiled in a nasty one sided argument with text nodes and while loops that frequently locked my browser up.

Finally I was able to get the thing under control and managed a pretty reliable favelet that will turn any text node it finds on a page that it figures looks reasonably like a URL into a clickable link.

Check out the info page, with the link for it, here, and let me know if you run into any issues with it.

Comments have been closed for this post.