Skip to content

Instantly share code, notes, and snippets.

@LeeRJohnson
Forked from zvoase/JSShell.js
Created November 23, 2011 17:40
Show Gist options
  • Save LeeRJohnson/1389332 to your computer and use it in GitHub Desktop.
Save LeeRJohnson/1389332 to your computer and use it in GitHub Desktop.
jsshell nots and dev
function addHeadScript (url, type, title, id) {
if (!url) return;
head = document.getElementsByTagName('head')[0];
script = document.createElement('script');
script.src = url;
script.type = (type) ? type : 'text/javascript';
script.title = title;
script.id = (id) ? id : title.replace(\\s+\, '-');
head.appendChild(script);
return script;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment