Insert jQuery into any page using a bookmarklet
categories: front-end development, javascript, jquery
Ever wish you could use jQuery on a page at the drop of a hat, without having access to the page itself? Well I'll be damned, you can.
(This is one of those things that in hindsight seems so painfully obvious that I'm almost embarrassed to admit that it never occurred to me, but admit it I will.)
For those working with jQuery 1.2.1, here is an updated Insert jQuery 1.2.1 bookmarket, and here is the code for the bookmarklet in its entirety:
javascript:void(function(){var s=document.createElement('script'); s.src='http://code.jquery.com/jquery-1.2.1.js'; document.getElementsByTagName('head')[0].appendChild(s);}())
I came across this in a recent post at Morethanseven, but the Simon Willison post is from August, so this is probably a bit of old news. I'm still excited though.
Related posts: front-end development
- Remote Javascript with document.write() is killing me - April 11th, 2008
- Bye bye YUI bloat - March 14th, 2008
- I have discovered a use for Dreamweaver's design view (no really) - January 18th, 2008
Related posts: javascript
- Remote Javascript with document.write() is killing me - April 11th, 2008
- Fix for slow-loading Google ads - April 6th, 2008
- Triangle Javascript Users Group - April 3rd, 2008
Related posts: jquery
- Triangle Javascript Users Group - April 3rd, 2008
- Selectors in jQuery - February 5th, 2008
- Fix uneven line lengths in headlines - January 12th, 2008