I'd like to know if it is possible to get the name of a site using javascript.
For example, if I'd like to get the main URL of a web-site, I will use
window.location.hostname
and the script will returns let's say "stackoverflow.com"
Now what about if I'd like the script to return only the name of a website, in this case "stackoverflow"? (stackoverflow.com --> stackoverflow; facebook.com --> facebook and so on, in other word, I would like to remove the first domain from the url)
Thanks!