Skip to content

Instantly share code, notes, and snippets.

@padde

padde/inject_jquery.js

Last active Aug 29, 2015
Embed
What would you like to do?
Inject jQuery Bookmarklet
(function(){
var s = document.createElement('script');
s.setAttribute('src', 'https://code.jquery.com/jquery-latest.min.js');
if (typeof jQuery == 'undefined') {
document.getElementsByTagName('head')[0].appendChild(s);
}
})();
(function(){var s=document.createElement('script');s.setAttribute('src','https://code.jquery.com/jquery-latest.min.js');if(typeof jQuery=='undefined'){document.getElementsByTagName('head')[0].appendChild(s);}})();
javascript:(function()%7Bvar%20s%3Ddocument.createElement(%27script%27)%3Bs.setAttribute(%27src%27%2C%27https%3A%2F%2Fcode.jquery.com%2Fjquery-latest.min.js%27)%3Bif(typeof%20jQuery%3D%3D%27undefined%27)%7Bdocument.getElementsByTagName(%27head%27)%5B0%5D.appendChild(s)%3B%7D%7D)()%3B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment