Do you know of a way to get the secondlevel domain of a website via javascript similar to document.location.hostname
?
I want to create a mailto bookmarklet that generates an email address from the string "info@" and the secondlevel domain. the issue with document.location.hostname is the "www." prefix.