browser hacks
Archived Posts from this Category
Archived Posts from this Category
Posted by Paul Smith on 17 Apr 2007 | Tagged as: browser hacks
This is a neat trick which allows you to create ‘active’ bookmarks which provide functionality without having to initially visit the site in question first. By creating a bookmark with an associated keyword, you can run searches on target sites from the Firefox address bar.
Example: The Oxford English Dictionary
To get the relevant query string, go to www.oed.com, and run a search. You will then be presented with the completed query string for running a search on this site, eg:
http://dictionary.oed.com/cgi/findword?query_type=word&queryword=test&find.x=16&find.y=22&find=Find+word
We want to make this dynamic, so need to replace the test string with a string variable. In this case, the relevant form element is ‘queryword’, so we can take this URL with its query string, and create a bookmark from it.
In Firefox, create a new bookmark – call it OED Search, or whatever you like. In the location box, add the following:
http://dictionary.oed.com/cgi/findword?query_type=word&queryword=%s
You can strip the rest of the query string, this is just cruft. Add a keyword, say ‘oed’ (this should be unique, so make it fairly obvious yet distinct). Save your bookmark.
Now, in your Firefox address bar, you can type something like ‘oed floccinaucinihilipilification’ and your browser should then integrate this into your bookmark location string, run the search, and return you a page of results as normal.
Obviously this can be done with any site which runs a search through a query string. Some sites obfuscate the search page in the results, so you will need to take the relevant form values from the initial form, rather than a completed query string, but the principle is the same.