Seems to work just fine. I'm using Ubiquity 0.14. Example search of "craigslist cars in saltlakecity" works as expected.
On Jan 8, 9:02 pm, InsanitySektor <[email protected]> wrote: > I found a craigslist command onhttp://labs.vunite.com/vubiqs/verbs.php > and tried copying it to the command editor... to no avail. (I didn't > want the others they had there...) But, it isn't working. Can > someone help? I'm new to Ubiquity. ;) > > CmdUtils.CreateCommand({ > name: "craigslist", > homepage: "http://vunite.com/labs", > license: "MIT", > description: "Search craigslist.org", > icon: "http://vunite.com/wp-content/themes/vunite/images/ > favicont.ico", > takes: { > "search term(s)": noun_arb_text > }, > modifiers: { > in: noun_arb_text > }, > preview: function(pblock, theterms, mods){ > //create a variable for the entered search terms > var terms = theterms.text; > var city = mods.in.text; > > if (terms.length <= 0 || terms == undefined || city.length > <= 0 || city == undefined) { > pblock.innerHTML = "Enter search term(s) and the city to > search. <br />Example: craigslist cars in saltlakecity"; > return; > } > else { > pblock.innerHTML = "Ubiquity will search " + city + " craigslist > for '"+ terms + "'."; > return; > } > > }, > > execute: function(theterms, mods){ > //create a variable for the entered search terms > var terms = theterms.text; > var city = mods.in.text.replace(/ /g,""); > > if (city.length <= 0){ > city = "sfbay"; > > } > > //opens the craigslist search > Utils.openUrlInBrowser("http://"+ city +".craigslist.org/ > search/sss?query=" + terms); > }, > > }); --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
