how do get the first url of website using javascript code example Example: javascript get url path window.location.pathname