Fun with Bookmarklets
by jtaylorj

Bookmarklets are very cool. They're available in almost every browser, and make repetitive editing tasks amazingly simple. The DMOZ definition of bookmarklets (as defined here) is:

Bookmarklets are tiny pieces of JavaScript code which are stored in a URL. To use a bookmarklet DO NOT left-click on it as normal, but instead right-click on it and choose "Add Bookmark" (in Netscape), or "Add to Favorites" (in Internet Explorer). Now whenever the bookmarklet is selected from your bookmarks the JavaScript code will run allowing you to quickly access various functions of the ODP. For more information see the Bookmarklets category Frequently Asked Questions list or the original Bookmarklets site.

Simple, right? If you aren't completely satisfied by the description, the FAQ is pretty extensive; it's a recommended read for everyone. It covers installation and troubleshooting. Since most of the 'technical stuff' is already covered by the FAQ, I'd like to focus on the 'where, why, and when' aspects of their usage (the objective stuff.)

Any time you think, "man, there has got to be a better way of doing this," there probably is. Bookmarklets! Any task that needs to be performed more than once, requires a basic system/pattern of input, and needs to be as simple as clicking a button can be used as a bookmarklet. They can be placed in (where else) your bookmarks, or, for simple one click access, in the one-click link toolbar provided by most browsers. Personally, I like the one-click access. I make one-click bookmarklets for pretty much everything I do more than once that requires typing.

Since I do a lot of category creation, I move sites from parent categories to new subcategories all the time. Leaving editor notes blank when doing major category changes is never good practice, so I like using my simple explanation of "New category sort." Enter

Name: Newcat
Purpose: It sets the editor note field to "New category sort."
Code: javascript:with(document.forms[0]) {void(newnote.value='New category sort.');void(omit[0].click());}
If I really wanted to get tricky, I could prompt for a "subcat" and have it automatically filled in -- but lets keep thing simple for now.
Where/When? Anywhere I create a subcategory and need to move sites to the new category.
Why? Because I'm lazy! It's simple and it's effective.

View Summary:
This one's a little more complicated. It doesn't save much typing -- it saves clicking. Several bookmarklets use what's known as a prompt. A prompt asks you for a bit of information, formats the information, then does whatever it is the bookmarklet is supposed to do with it.

Name: View Summary
Purpose: It asks for an editor name and displays the editor's summary.
Code: javascript:void(ODPdan=prompt('View whose editing summary?',''));if(ODPdan){self.location.href=''+ODPdan};
Enter the name of your choice and like magic you get the information you requested!
Where/When? Anywhere at all. Keep in mind that whatever window you're in will be redirected.
Why? Using bookmarklets for this is simple and saves countless clicks. This helps in forum posts when you want a bit more information, in e-mails when you don't have convenient links, or in editor logs where you can copy a name and paste it in this bookmarklet.

So far I've mentioned bookmarklets that output text or require text input. But I'm lazy and I want a bookmarklet that requires absolutely no setup at all. Have you ever noticed that it takes two clicks to get to super unreviewed edit from the regular old category edit page? Personally, that's one too many clicks (and a bit too much load time) for my liking.

Name: Super-unrev
Purpose: A single click from any category edit page will redirect the browser window to the super-unreview page.
Code: javascript: {cat=document.forms[0].cat.value; cat=self.location.href='' + cat + '&super=1&chainsaw=1'; }
More magic! Well, not really. Most web pages you view have information hidden from view and in the case of editing pages, there is a "hidden" field containing the full path of whatever category you happen to be in. Tricky. Best of all, it requires absolutely no prop-work from you.
Where/When? Any category you have permission in. Keep in mind that whatever window you're in will be redirected.
Why? Powered unreview pages can take a long time to load, especially if there are lots of sites in the queue. This bookmarklet skips the step of powered unreviewed and goes straight to super unreviewed.

I've only mentioned three bookmarklets in this article, but there are dozens more available at Test: Tools for Editors: Bookmarklets. Again, if you're interested in bookmarklets, see the category FAQ in the link above. The bottom line? If you're tired of doing the same task over and over, or just want things to be easier, create a bookmarklet!


- jtaylorj

Previous   Home Comments   Next