>From what I remember, .text and .length members were replaced in recent
versions of Ubiquity...I may be mistaken, though.

On Thu, Jan 8, 2009 at 9:02 PM, InsanitySektor <[email protected]>wrote:

>
> I found a craigslist command on http://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<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 &lt;= 0 || terms == undefined ||  city.length
> &lt;= 0 || city == undefined) {
>            pblock.innerHTML = "Enter search term(s) and the city to
> search.  &lt;br /&gt;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 &lt;= 0){
>           city = "sfbay";
> }
>
>            //opens the craigslist search
>            Utils.openUrlInBrowser("http://"+ city +".craigslist.org/
> search/sss?query= <http://craigslist.org/search/sss?query=>" + terms);
>    },
>
>
> });
>
> >
>


-- 
o-o;

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to