Created
July 25, 2013 18:13
-
-
Save andershaig/6082306 to your computer and use it in GitHub Desktop.
Inject jQuery into a page (e.g. via console)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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