Get domain of Javascript file
<p>So I have a site at <a href="http://mysite.com/" rel="nofollow">http://mysite.com/</a> and I have a Javascript file on a CDN, the Javascript file could be at <a href="http://cdn1.mysite.com/" rel="nofollow">http://cdn1.mysite.com/</a> or <a href="http://cdn2.mysite.com/" rel="nofollow">http://cdn2.mysite.com/</a>, I need to get the value of the hostname the javascript file is on. Is there any way to do this? I cannot modify the embed code of the javascript file to add a custom ID or add an additional variable on mainsite.com.</p>

<p>The reasons why I need this are far too complicated for one post =)</p>
