Auto-Quicksearch Bookmarklet
One of the handiest features in Mozilla Firefox (for me) is the Quicksearch bookmark function. This lets me create a special bookmark with a keyword associated, so when I want to search Amazon for John Scalzi’s latest books, I can type “amazon john scalzi” in my browser’s location bar and automatically get taken to the search results.
How it works: a Quicksearch bookmark has, somewhere in its URL, the string %s. When you type the bookmark’s keyword followed by some search terms, Firefox automatically replaces the %s with the search terms and then takes you to that URL. For instance, my Google bookmarklet has the following URL: http://www.google.com/search?&q=%s. When I type “google blue rondo” it actually sends me to http://www.google.com/search?&q=blue%20rondo which brings up Google’s search results for the term “blue rondo.”
I use this feature constantly, and I have several dozen Quicksearch bookmarks defined for the sites I use regularly: IMDB, AllMusic, TVTome, etc. But constructing each one of these bookmarks was tedious: I had to read through the HTML source code of each site, find the relevant URLs and search-form field names, construct the proper search URL by hand, and put it into a bookmark.
Today, I brushed off my Javascript skills and threw together a bookmarklet that automatically scans the page you’re looking at and builds potential Quicksearch URLs for any form on the page. It’s still up to you to decide which of the URLs built looks like the correct one (a single page may have several forms, only one of which is probably the search form), copy it into a bookmark in your Bookmarks Manager, and make sure it works correctly.
If you want to have access to this bookmarklet, simply click and drag this link to your Bookmarks Toolbar: Build Quicksearch. Then visit a page with a search form and click the bookmarklet button. The page you’re viewing will be replaced by a list of possible Quicksearch URLs. Turn the one you want into a bookmark, give it a memorable keyword, and voilá: you’ve simplified your life.
2 Comments
Comments are closed.




FYI: this bug indicates that this feature was already added to Firefox. In 1.0PR, right click on a search field and choose “Add a keyword for this search.”
Hah. Handy.
Oh well. At least I got some bookmarklet-writing practice.