Inject jQuery into a page with a bookmarklet
Filed under: Food for thought | No Comments »
Three easy steps to making your own jQuery bookmarklet, allowing you to dynamically inject jQuery into any page on the internet.
Make a new bookmark in your browser, name it “Inject jQuery”
Copy and paste this code into the “location” of the bookmarklet:
javascript:var%20s=document.createElement(’script’);s.setAttribute(’src’,%20′http://jquery.com/src/jquery-latest.js’);document.getElementsByTagName(‘body’)[0].appendChild(s);alert(‘jQuerified’);void(s);
Save the bookmark.
Now all you have to do is click the bookmark whenever you want [...]
