Skip to content

Instantly share code, notes, and snippets.

@scripting
Created October 24, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scripting/eacc5e5e993db296ac59 to your computer and use it in GitHub Desktop.
Save scripting/eacc5e5e993db296ac59 to your computer and use it in GitHub Desktop.
function includeScriptCode (url, callback) {
var head = document.getElementsByTagName ("head") [0];
var x = document.createElement ("script");
x.src = url;
if (callback !== undefined) {
x.onload = callback;
}
head.appendChild (x);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment