Nikita Kazakov
Nikita Kazakov
~1 min read

Tags

I recently stumbled on this technique where you can load JQuery for ANY page and write JQuery commands right in the browser console. This is great for debugging and exploration.

Method 1 – Bookmark Injector

Straight from this post on stack overflow. Create a bookmark in your browser and for the url, paste in:

javascript:(function(e,s){e.src=s;e.onload=function(){jQuery.noConflict();console.log('jQuery injected')};document.head.appendChild(e);})(document.createElement('script'),'//code.jquery.com/jquery-latest.min.js')

Click on the bookmark and look at your console. You’ll notice it says “jQuery injected”. That’s it, you can now inject JQuery with a single click on any page.

Method 2 – Copy / Paste JQuery.min

If the above method didn’t work for you, you can copy the jquery.min.js contents right into the console. This will load up JQuery on any page. I noticed that this method crashes my browser after a few minutes. I don’t use this method and your results may vary.