Skip to content

Instantly share code, notes, and snippets.

@vanm
Created November 10, 2011 19:06
Show Gist options
  • Select an option

  • Save vanm/1355790 to your computer and use it in GitHub Desktop.

Select an option

Save vanm/1355790 to your computer and use it in GitHub Desktop.
Dynamic Script Generation
(function(){
var e = document.createElement('script'); e.type='text/javascript'; e.async = true;
e.src = document.location.protocol + '//yourdomain.com/packaged_third_party_javascript.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(e, s);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment