Skip to content
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (8 sloc) 1.01 KB

Insert jQuery into any page using a bookmarklet

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:

{% codeblock lang:javascript %} javascript:void(function(){var s=document.createElement('script'); s.src=''; document.getElementsByTagName('head')[0].appendChild(s);}()) {% endcodeblock %}

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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.