How to Create a jQuery Bookmarklet

I suspect many of my readers have written at least one jQuery Plugin / Script. In this post, I’d like to show you how to get the most out of that script by also releasing it as a jQuery Bookmarklet. Below, you’ll find two examples of utilities that are ripe for bookmarkleting, as well as a prepared jQuery Bookmarklet file that you can easily modify for the purpose.

Note: Even if you haven’t written a jQuery plugin before, you’ll find bookmarkleting someone else’s plugin as easy as using it on a site.

Before I get to the code though – take a look at the payload. You can add the following links as bookmarklets by right-clicking and selecting “Add to bookmarks / favorites” (in Chrome, you press “ctrl+shift+b” to open the bookmark manager, and drag them over). You can try them before you bookmark them by simply clicking the links on this page too.

Example One:


Clicking the above link will add the table sorter jquery plugin to the page, including its stylesheet, and it will apply the script to all tables on the page. Once it’s loaded, you can click on any of the table column headers to sort the rows by column values.

Example Two:

The visualizer bookmarklet will add graphical representations of the data in the table. As with the table sorter, this bookmarklet was adapted from a pre-existing plugin, Filament’s jQuery Visualize.

2009 Employee Sales by Department
food auto household furniture kitchen bath
Mary 190 160 40 120 30 70
Tom 3 40 30 45 35 49
Brad 10 180 10 85 25 79
Kate 40 80 90 25 15 119

(Continue This Article…)

How to use Firebug in IE6 (and all other browsers)

Yaknow, I’ve been using Firebug for quite some time, but I haven’t seen many places mention using it as a bookmarklet. Having gotten partway through programming my own makeshift javascript bookmarklet debugger, I was thrilled to find out Firebug Lite can be bookmarkletized too! Here’s the link – right click and add it to your bookmarks to try it out:

Free RapidShare Service & Countdown Bypass JavaScript

The free RapidShare downloads are pretty good – but the downloading process  is unnecessarily frustrating. Whereas many other providers drown their visitors with ads to generate revenue that pay for their servers (which is reasonable), RapidShare forces you to wait for no reason other than to frustrate you.

Fortunately, as adblocker has proven, we are capable and legally entitled to control the display of websites as we please. So, with no further ado, here is the solution:

Simply right click and bookmark the above link, so that next time you’re stuck on a web page that’s making you wait for no good reason, you can open the bookmark, and the countdown will immediately complete.

Here is a Rapidshare File to test it on.

(Continue This Article…)