Skip to content

Instantly share code, notes, and snippets.

@girlcheese
Created November 26, 2012 16:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save girlcheese/4149159 to your computer and use it in GitHub Desktop.
Save girlcheese/4149159 to your computer and use it in GitHub Desktop.
Inject jQuery into a page
;(function() {
var tag = document.createElement('script');
tag.src = 'http://code.jquery.com/jquery.min.js';
tag.type = 'text/javascript';
tag.async = 'true';
var hookTag = document.getElementsByTagName('script')[0];
hookTag.parentNode.insertBefore(tag, hookTag);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment