Inject JQuery – bookmarklet

If you want to inject jquery in a page from your browser, you can use the following bookmarlet.

Just drag & drop the following link to you bookmark address: Inject jQuery.

NB: jQuery is then inserted without using the compatibility mode (typing “jQuery” instead of “$” is too much a hassle for me).

Once jQuery is loaded, you can then play around in the console. You can do a lot things. For instance on google news,

$('.esc-layout-article-cell h2 a span').each(function(){ console.log($(this).text()); });

will scrape the news titles on the page.

  1. No comments yet.

  1. No trackbacks yet.