search-engine: provide alternative urls for search engine webjumps
commitd29cfab8f84a7ce866411fcd3f340a9daba335d3
authorDavid Kettler <kettler@internode.on.net>
Thu, 5 Feb 2009 01:01:03 +0000 (5 11:31 +1030)
committerDavid Kettler <kettler@internode.on.net>
Sun, 8 Feb 2009 11:37:28 +0000 (8 22:07 +1030)
tree0e3095f2adfc4f91854de54b857df2e2081fafc5
parent55940e07d46729b95c41e035e92691e630a843e3
search-engine: provide alternative urls for search engine webjumps

The alternative url is visited when the user provides no arguments to
the webjump; thus the webjump can function both as a way to invoke a
search and as a bookmark.

The alternative may be specified to define_search_engine_webjump().
If no alternative is supplied, conkeror will try to guess an
appropriate url.  The guess uses the text/html url for the search
engine and trims off the path and any "search." prefix on the domain.
This works for all the supplied search engines.

It may be better to attach the alternative to the webjump object and
to have the alternative logic in getWebJump().  Then it need not be in
the handlers specified in define_webjump() and
define_search_engine_webjump().
modules/search-engine.js