function dynamicallyLoadScriptIn(url, document) { var script = document.createElement("script"); script.src = url; document.head.appendChild(script); } console.log("parent: " + parent); console.log("parent location: " + parent.document.location); //dynamicallyLoadScriptIn("https://code.jquery.com/jquery-1.10.2.js", parent.document); dynamicallyLoadScriptIn("https://botcompany.de/1026221/raw?rand=" + Math.random(), parent.document); //dynamicallyLoadScriptIn("https://botcompany.de/1026215/raw", parent.document); console.log("loaded scripts");