Hey,
I already have quite a bit of js on my site, so I want to have a function that grabs the domain name of the current url as efficiently as possible.
Example:
input : http://stackoverflow.com/questions/ask
result : stackoverflow.com
input : http://test.stackoverflow.com/questions/ask
result : test.stackoverflow.com
I guess the best way to start is with document.location, but I'm at odds what to do from there.