How to Extract the Hostname Portion of a URL in JavaScript