Last active
December 16, 2016 23:58
-
-
Save CAYdenberg/5791361d8b657d14774d3fcbf4e05097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function injectScript(url, id) { | |
var js; | |
if (document.getElementById(id)) { | |
return; | |
} | |
js = document.createElement('script'); | |
js.id = id; | |
js.async = true; | |
js.src = url; | |
js.charset = 'utf-8'; | |
document.body.appendChild(js); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment