Hello Dexrop,

Let me help you, I have made my commands using few lines of jQuery and some
imagination, if you are familiar with jQuery ir will be easy.

I have made a command to find out presenters at FISL (a Free Software event
at Brazil)
This is the code inside execute method of a Ubiquity command:

     var data = {};
     data.name = args.object.text;
    // Getting page content
    $.ajax({url: "http://www.fisl.org.br/10/www/palestrantes/";,
           cache: false,
           success: function(html){

            // Cleaning the HTML
            var indexOffset = html.indexOf('<ul id="palestrantes">');
            html = html.substr(indexOffset, html.length);
            indexOffset = html.indexOf('</ul>')+1;
            html = html.substr(0, indexOffset);

             // Looking for user query
             var myObject = jQuery(html).find("li:contains('" +
args.object.text + "')").find("strong");
             if (myObject.length == 0) // No presenter was found
             {
                 displayMessage("Nenhum palestrante encontrado");
                 return;
             }
             // Show presenters
             myObject.each(function(){
                displayMessage($(this).text());
            });
           }

Regards,
Felipe Plets
http://www.plets.com.br/


On Tue, Aug 18, 2009 at 12:45 AM, Dexrop <[email protected]> wrote:

>
> I just found out about Ubiquity(i love it) and i decided to make a few
> commands that would meet my needs. So i was just wondering how you
> would get information from a list on a site that is constantly
> updated, as well as show that list in the preview.
>
> Thx
> >
>

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