Skip to content

Instantly share code, notes, and snippets.

@maxp
Created November 19, 2011 04:48
Show Gist options
  • Select an option

  • Save maxp/1378461 to your computer and use it in GitHub Desktop.

Select an option

Save maxp/1378461 to your computer and use it in GitHub Desktop.
fast insert script tag
(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