UP Javascript

Well I've started using Firebird after hearing about it from these weblogs. So far I like it and I think I'm about to make it my default browser.

One thing I'm missing from my google toolbar in IE is the Up button to take me up one directory level. So I was thinking of a way to do this and so I decided to write a small bookmarklet:

javascript:var loc=location.href.match(/(\w+:\/\/[\w.]+\/(?:[^\s\/]*\/)*)[^\s\/]+\/?/); if(loc!=null) void(location.href=loc[1]); UP

I threw together a regular expression to parse the url to get the parent. I thought some other people may find this useful so there it is.

NOTE: I have only tested this lightly in IE 6 and Firebird 0.6

No Comments