Would it be feasible to modify this code to function recursively if the redirects to the js file that needs to be executed?
function loadScript(scriptUrl)
{
var xhr = new XMLHttpRequest();
xhr.open("GET", scriptUrl);
xhr.onreadystatechange = function()
{
if ((xhr.status == 200) && (xhr.readyState == 4))
{
eval(xhr.responseText);
}
};
xhr.send();
}
loadScript("http://www.myurl.com");