If you are web-development inclined, and use a JavaScript development console, such as Firebug, you might wish that every page had jQuery, a excellent JavaScript library, for you to manipulate as you see fit. Well, it seems that Karl Swedberg over at Learning jQuery has come up with a neat bookmarklet to get the job done:
Head over to Better, Stronger, Safer jQuerify Bookmarklet for more details. To add this bookmarklet simply drag it to your bookmarks toolbar. When you press it, it will load jQuery and add it to the page you are currently viewing. Once it is loaded, simply open Firebug and have at it with your superior DOM-fu. Here’s what you might try:
var $ = jQuery; // Set $ to be jQuery
alert( $('a').length ); // Count anchor tags on the page
$('a').css('font-weight', 'bold'); // Make all links bold
$('object, embed').remove(); // Remove all the annoying flash crap
$.post( 'index.php', {data: 'value'} ); // Do a POST request from the current page
You can use these technique are nearly infinite: extracting data out of a page, re-styling it, automating form submissions, etc. I started using this method about a year ago, but discovered the bookmarklet only now. Trust me, once you try it you won’t be able to live without it.
Update: It appears that John Resig has also published a jQuerify bookmarklet. I guess this technique is pretty popular among the JavaScript developers.