WISDOMBAY

in4mation ... organized

BOOKMARKLET SECTION @ WISDOMBAY

A periodic Section maintained by Pramod S Nair

7. A bookmarklet that parses the domain name part only from a URL

Posted on WisdomBay @ 8:36 PM 2/14/2006 | Post by Pramod S Nair

This Bookmarklet parses the domain name part of the current URL for you. This script can be very useful for those who need to build their on bookmarklets. (for ex : it gets wisdombay.com from http://www.wisdombay.com/articles/example.htm)

How to Install :
1. Copy the code given above to clipboard.
2. Add a new entry to your Favorites menu.
3. Take the property of the newly added Bookmark by right clicking on it from Favorites menu and paste the copied code in to the URL textbox in the resultant property box.
4. Press Ok. (If an warning message is shown regarding Javascript Protocol, continue with the Yes button)
5. Now if for any reason you need to parse out the domain name part only of an URL, use this bookmarklet.