22Mar/0827
Go to Home
The best ideas come from finding something you do all the time, realize you do it, and then automate it.
With me, I discovered that I frequently go to the base domain of a website by going to the URL, highlighting and deleting the junk on the end of the domain name and then pressing enter. I HATE doing it. I also have to do it when websites don't link to their home page.
So here's an easy solution. A bookmarklet!
Drag the link below to your bookmarks bar (or in IE, right-click and add to favorites):
Here is the code:
var url = new String(location.href);var re = new RegExp('https?://([A-Za-z0-9.-]+)');var res = url.match(re);location.href=res[0];
Enjoy


March 23rd, 2008 - 03:39
I didn’t realize I needed this until I saw it. Thank you, clever man.
August 30th, 2008 - 00:48
I do that a lot two, luckily I found a Firefox add-on that allows me to navigate up a level. It’s called uppity: https://addons.mozilla.org/en-US/firefox/addon/869
August 30th, 2008 - 01:05
Nice!
August 30th, 2008 - 01:19
Thanks! This is one of those things you wonder how you did without.
August 30th, 2008 - 01:26
Um… brilliant. Fucking brilliant.
August 30th, 2008 - 01:44
Also, if one is using Safari they can right click on the page title at the top of the window to go to there as well.
August 30th, 2008 - 01:49
Here’s the ubiquity command for the same functionality:
CmdUtils.CreateCommand({
name: “root”,
_root: function() {
var doc = Application.activeWindow.activeTab.document;
var uri = doc.location.href;
var re = new RegExp(“^[A-Za-z0-9.-]+://([^/]+)”);
var res = uri.match(re);
return res && res[0];
},
preview: function(pblock) {
var msg = ‘Go to: “${rootUri}“‘;
pblock.innerHTML = CmdUtils.renderTemplate( msg, {rootUri: this._root()} );
},
execute: function() {
doc.location = this._root();
}
})
August 30th, 2008 - 01:51
https://www.squarefree.com/bookmarklets/misc.html#top has been around forever, to save you some time in the future. There’s a ton more great ones on that site.
August 30th, 2008 - 01:53
javascript:location.pathname = “”; void 0
is also much simpler
August 30th, 2008 - 01:58
Or.. just click on the logo of the website, will do it for 90% of websites
August 30th, 2008 - 02:21
Hi I tried dragging it to my address bar but I got this error:
[an error occurred while processing this directive]
Please check your code works in IE
August 30th, 2008 - 06:24
Or you could use the location bar plugin for Firefox. Does this and WAY more.
August 30th, 2008 - 10:14
Thank you !!!!
August 30th, 2008 - 10:51
Wonderful! Thank you!
August 30th, 2008 - 11:11
Also, the Vimperator plugin for Firefox does this (and also single-level-up) with the gu and gU keys.
August 30th, 2008 - 13:12
Thanks, so much!
August 30th, 2008 - 14:47
Pretty cool. Thanks!
August 31st, 2008 - 02:15
This is very sad code. It is obvious you haven’t worked with javascript very much. For instance, location.href alread returns a string always. This code could be greatly simplified:
javascript:location.href = location.protocol + ‘//’ + location.host
September 1st, 2008 - 23:36
Thanks everyone for the comments, suggestions and other product advice.
Fearphage — there’s always multiple ways to do something. That doesn’t make one worse than the other. location.host adds the port to the URL — I find that ugly.
September 10th, 2009 - 18:31
Hi! I was surfing and found your blog post… nice! I love your blog.
Cheers! Sandra. R.
October 29th, 2009 - 16:18
usual calcium supplementation in thyroidectomy patients Order Clomid (Serophene) unwed mothers safe drug nj lynx diet low heart beats
http://rxdrugs24x7.com/product/enmobil-cream.html
October 29th, 2009 - 17:47
county of san joaquin medical social worker 0539 Order Levlen diabetic tendencies chromium hoodia diet pills catholic depression
http://rxdrugs24x7.com/product/eldepryl.html
February 13th, 2010 - 13:25
www kwsp com my
2008 chevy vin number decoder
andrea rincon selena spice pics
curvas peligrosas diet
astra 357 mag pistol
deeann donovan nude
porsche toll booth crash
vintage layouts myspace xanga
phudi mari sab ne
lady justice butler sloss
lyrics for dey know lil wayne
pharrell clothing line
abbies hair braiding
pictures of cornrow styles
free online wedigie board
nicole coco austin videos
marshall football 1970 results
lil wayne cannon lyrics dedication 2
texas star linear amps
pharrell clothing line ice cream
February 13th, 2010 - 13:26
kalahari wis dells
hinh anh nguoi mau
angled bob pics
baby shower poemas en espanol
kansas kdoc casper
egyptian hyroglifics numbers
flavor flav deelishis vh1
goku ssj5 mugen char
hardness nickel titanium
nitto 1320 legends apoc download
danny bonaduce fired from adam corolla
cp trainer 2 clothes codes
outfitters hunting for deerand turkey
mood ring color meanings chart
jonas brothers cell phone numbers
unverisal soul circus in savannah ga
st louis craiglist
miley cyrus real home address
imaganarium train table
hinh khoa than nam gioi
February 13th, 2010 - 13:26
ls magazine 14
gangster disciples literature
online applications for winn dixie
when was dream deferred written
cheats to get cars on nitto
mugen coruscation full game download
tapers haircuts
niurka marcos en tangas la playas
gram to ml conversion
ver como cojen las mexicanas en mexico
porsche car accident girl
subway make you a sammich
chut pe land
sadlier oxford vocabulary answers level g
paper ruler measure face
rachel hunter playboy shoot
noelia prno
sexi golpo
video porno de jaquy gerrido
joe flacco girlfriend
February 14th, 2010 - 20:23
patterns for knifty knitter looms
bisquick peach cobbler recipes
jc penney furnature outlet brice
triple venn diagram
myspace alphabet letters codes
calendario de la taina
actress kelita smith nude photos
free bubble letter stencils
knifty knitter straw weaveing
sbc yahoo email login
free brooke burke myspace backgrounds
sanandres cheat code for xbox
thaimisc ls board
kristy alley weight loss
dey kno lyrics
www nhacviet net
glen gery brick
me n eds fresno
carson prairie scott department store
eragon book 3 release date
February 15th, 2010 - 03:39
greet me ringtones
el rey de oro nightclub
chevy vin number breakdown
double elimination pool tournamnet brackets
a worn path by eudora welty
gadis seksi
rockford ohare bus
zahra amir ebrahimi
darius mccrary aids rumor
nikki castouras death pics
gecu bank el paso credit union
zetec serpentine belt replacement
layered bob hircut
index of topless05 jpg
irs form 8109 b coupon
la paranza
how to build your own smokehouse
examples of conceit poems
remington browning mspace backgrounds
urdu sexy stories kahani visit