function dynamicallyLoadScriptInTopWindow(url) { var script = document.createElement("script"); script.src = url; window.top.document.head.appendChild(script); } console.log("loading jquery"); dynamicallyLoadScriptInTopWindow("https://code.jquery.com/jquery-1.10.2.js"); var scriptURL = "https://botcompany.de/1026221/raw"; console.log("trying to load: " + scriptURL); dynamicallyLoadScriptInTopWindow(scriptURL); console.log("added top-level script");