Javascript UP Bookmarklet

Sometime last June I posted about a Javascript Bookmarklet that lets you move up one directory level.  I had a comment from a user about allowing it to dig into sub-domains when it was at the root.  So I have revised it to allow for this as well as fixed some other bugs that were in it. 

I did some basic testing (by no means exhaustive) on IE 6 and FireFox 0.8, and it seem to work pretty good so I figured I would post it here incase anyone else wants it.

javascript:var m=location.href.match(/(.+:\/\/)([^\.]+\.)((?:[^\.\:\/]+\.)*(?:[^\.\:\/]+)(?:\:\d+)?)(?:(\/(?:[^\/]+\/)*)(?:[^\/]+\/?))?/); void(location.href=m[1]+(m[4]==null||m[4]==""?m[3]:m[2]+m[3]+m[4]));
UP

No Comments