Wednesday, February 13, 2008

Firefox location box quick search

Here is a little trick I like to use with Firefox.

If you know Firefox, you must know that there is a location box and a search box in the tool bar. You type the URL (website address, the "www.***.com" thingy) in the location box, while you type whatever you want to search (eg. Google) in the search box. Yet I am a keyboard guy and hate to move my hand frequently between those boxes. So I use the location box for everything. In this way, I could also keep the search box locked on Google search and don't have to click on that little icon and switch between search engines.

Thus this is what I do when I need to search. For example, to search for "blog" on Wikipedia, I can just type "wp blog" in the location bar and press enter:


And Firefox takes me there:

Here, "wp" is the keyword for wikipedia search, add a space and what you want to search for and there you have it.

So how does this work?
I have been using Firefox since 0.7 beta, and with early versions, they came with preset bookmarks in a "Quick Search" folder. These search bookmarks have keywords that were already setup so you can type short words (such as "wp" for the whole wikipedia search string) instead of the whole URL of the site.

So, if you don't already have those bookmarks set up, here's how:
On the menu bar, goto "Bookmarks"->"Organize bookmarks" to open the Bookmarks Manager window.
In the new windows, there is a "New Bookmark" button, click on it and you'll get a pop-up window like this:

So, for Google, the default I got is...

So you could type "google ***" (*** is what you want to search for) in the URL box. What's important here is the Location URL and the Keyword. The Keyword is what you use to call the search function. So if you don't like the keyword, change it to what ever you like, just remember what you used. The Name and Description doesn't matter, it's just labels for you to read when organizing bookmarks.

With Wikipedia, it's

Location: http://en.wikipedia.org/wiki/Special:Search?search=%s
Keyword: wp

So, figuring out how it works, here's some handy new ones I made:

For NCBI/PubMed paper search (I love this one!):
Location: http://www.ncbi.nlm.nih.gov/sites/entrez?db=pubmed&cmd=search&term=%s
Keyword: ncbi
So type "ncbi whatever" to search for whatever.

And for Wikipedia Japan:
Location: http://ja.wikipedia.org/wiki/Special:Search?search=%s
Keyword: wpj
So type "wpj whatever" to search for whatever. (For Wikipedia Chinese, change that "ja" in the location to "zh", yet I don't know how to set it to simplified or traditional Chinese)

Happy searching!

No comments: