Skip to content

Instantly share code, notes, and snippets.

@andershaig
Created July 25, 2013 18:13
Show Gist options
  • Select an option

  • Save andershaig/6082306 to your computer and use it in GitHub Desktop.

Select an option

Save andershaig/6082306 to your computer and use it in GitHub Desktop.
Inject jQuery into a page (e.g. via console)
var s = document.createElement('script');
s.setAttribute('type', 'text/javascript');
s.setAttribute('src', 'https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js');
var head = document.getElementsByTagName('head')[0];
if (head) {
head.appendChild(s);
} else {
document.body.appendChild(s);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment