So I have a script that is loaded dynamically into the page as so:
<div>
<script>
var url = 'http://example.com/scripts/myscript.js?foo=bar';
document.write('<scr'+'ipt type=\"text/javascript\" src=\""+url+"\"></scri'+'pt>')
</script>;
</div>
I need to know, if there is a way, inside the myscript.js i am loading, to access the url to get the query string.
Thanks