Pipelinked chatterbox URLs follower

Sometimes people like to post external links in the chatterbox as pipelinks like this, which avoids messing up the chatterbox, but can make it fiddly to follow the link.

Added to your notelet nodelet, this HTML creates a button which will attempt to open the most recent link in the chatterbox in a new window as if it is an external URL.

Note that in all versions you can save precious notelet space by altering the button text from 'Go' to something shorter of your choosing. Also there are some extra spaces in there which stop this writeup breaking people's browsers.

Generic version

If you're not pushed for space in your notelet nodelet, this version will work in IE and Mozilla and Netscape:

<button onclick="A=document.formcbox.getElementsByTagName('a');I=A.length; while(I-->=0&&!(U=A&#91;I&#93;.title));H='http://';if(U.substring(0,7)!=H)U=H+U; window.open(U)">Go</button>

Platform specific

Internet Explorer

This version is ever so slightly smaller.

<button onclick="A=document.formcbox.getElementsByTagName('a');I=A.length; while(I-->=0&&!(U=A(I).title));H='http://';if(U.substring(0,7)!=H)U=H+U; window.open(U)">Go</button>

Generic chatterbox URLs follower (added 2004-06-23)

Despite the existence of this utility, some people persist in posting URLs into the chatterbox unpipelinked. Usually the URLs are too long for the chatterbox and are automatically broken up with spaces, which stops them breaking the screen width but makes them fiddly to follow.

Therefore, I proudly present the new and improved link follower. This version checks to see if you have highlighted any text on the page (not just in the chatterbox), and opens that as a link, removing any spaces it finds. Failing that, it functions as before - opening the most recent pipelinked chatterbox URL.

Naturally, it takes up more notelet space, which is why I've left the old version above.

Generic version

<button onclick="D=document;if(S=D.all?D.selection.createRange().text:D.getSelection()){ U=S.replace(/\s/g,'')}else{A=D.formcbox.getElementsByTagName('a');I=A.length; while(I-->=0&&!(U=A&#91;I&#93;.title));}H='http://';if(U.substring(0,7)!=H)U=H+U; window.open(U)">Go</button>

Platform specific

Firefox, Mozilla, Netscape etc

<button onclick="D=document;if(S=D.getSelection()){ U=S.replace(/\s/g,'')}else{A= D.formcbox.getElementsByTagName('a');I=A.length;while(I-->=0&&!(U= A&#91;I&#93;.title));}H='http://';if(U.substring(0,7)!=H)U=H+U;window.open(U)" >Go</button>

Internet Explorer

<button onclick="D=document;if(S=D.selection.createRange().text){U=S.replace(/\s/g,'')} else{A=D.formcbox.getElementsByTagName('a');I=A.length;while(I-->=0&&!(U= A(I).title));}H='http://';if(U.substring(0,7)!=H)U=H+U;window.open(U)" >Go</button>

An alternative (added 2006-09-14)

If you're using Firefox, there's an extension available called Redirect Remover which is a better way of dealing with this problem.

Log in or registerto write something here or to contact authors.