On Sun, Feb 22, 2009 at 4:31 AM, Abimanyu Raja <[email protected]>wrote:
> Wonderful! Now, can we get previews for the all built-in commands like > Yahoo!, ask, etc? > That was the idea - the only problem (or at least the biggest as I see it) is commands that currently have a preview in place, that in some cases are prettier and/or more informative. Doesn't quite feel right to undo peoples hard work, but on the other hand, it would be nice it all our search-commands looked "the same" -- cers / Christian Sonne > > - Abi > > 2009/2/18 Christian Sonne <[email protected]> > > Hi all, >> >> Last night, I pushed some changes to CmdUtils.makeSearchCommand, such that >> it is now easy to create a search command with keyboard-navigatable preview >> of the results. (via accesskey corresponding to resultnumber) >> >> It has much room for improvements, but I encourage you to play around with >> it, and suggestions for improvements are much welcome. >> >> I've made a few examples myself: (some are named oddly, as to avoid >> name-crash with existing default search commands) >> >> CmdUtils.makeSearchCommand({ >> name: "Trac", >> url: >> "https://ubiquity.mozilla.com/trac/search?q={QUERY}<https://ubiquity.mozilla.com/trac/search?q=%7BQUERY%7D> >> ", >> icon: "https://ubiquity.mozilla.com/trac/chrome/common/trac.ico", >> parser: {container: "dl#results", >> title: "dt", >> preview: "dd.searchable", >> baseurl: "https://ubiquity.mozilla.com"}, >> description: "Searches Trac for your words." >> }); >> >> CmdUtils.makeSearchCommand({ >> name: "poodle", >> url: >> "http://www.google.com/search?q={QUERY}<http://www.google.com/search?q=%7BQUERY%7D> >> ", >> icon: "http://www.google.com/favicon.ico", >> parser: {container: "div ol", >> title: "h3.r", >> preview: "div.s"}, >> description: "Searches Google for your words." >> }); >> >> CmdUtils.makeSearchCommand({ >> name: "wookiepedia", >> url: " >> http://en.wikipedia.org/wiki/Special:Search?search={QUERY}&fulltext=Search<http://en.wikipedia.org/wiki/Special:Search?search=%7BQUERY%7D&fulltext=Search> >> ", >> icon: "http://en.wikipedia.org/favicon.ico", >> parser: {container: "ul.mw-search-results", >> title: "li a", >> preview: "div.searchresult", >> baseurl: "http://en.wikipedia.org"}, >> description: "Searches Wikipedia for your words." >> }); >> >> Obviously, you'll need to run ubiquity from source for this to work. >> >> Best regards, >> -- cers / Christian Sonne >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ubiquity-firefox" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ubiquity-firefox?hl=en -~----------~----~----~----~------~----~------~--~---
