Displaying google search?

1 view
Skip to first unread message

SilentGuy

unread,
Jan 5, 2009, 8:20:13 AM1/5/09
to ubiquity-firefox
I just loaded an external command called java that uses google to get
a java api... Now i wanted to do some modifications to it and i
noticed, that it contains:

jQuery.get( url, params, function(data) {
var numToDisplay = 3;
var results = data.responseData.results.splice( 0, numToDisplay );
pblock.innerHTML = CmdUtils.renderTemplate( {file:"google-
search.html"},
{results:results}
);
}, "json");

but it does not display anything in the preview...

after some googling I found

jQuery.get( url, params, function(data) {
var numToDisplay = 3;
var results = data.responseData.results.splice( 0, numToDisplay );
pblock.innerHTML = CmdUtils.renderTemplate( {file:"templates/google-
search.html"},

{results:results, searchTerm:searchTerm}
);
}, "json");

but this does nothing either... I can'tfind any help about templates,
and the few cases where i found them used were "makeSearch" commands
and this is just a normal preview...
Any hint what's wrong here?

pvncad

unread,
Jan 5, 2009, 1:11:08 PM1/5/09
to ubiquity-firefox
You may want to try javadoc command which I wrote sometime back at
http://www.geocities.com/praveena_sampige/javadoc.html.
It provides a better preview and directly works on sun website rather
than google.

-pvncad

SilentGuy

unread,
Jan 5, 2009, 6:01:03 PM1/5/09
to ubiquity-firefox
Hm, okay, fine example of solving a problem by ignoring it ;-)
Just kidding, your preview is definitly nicer, but i liked the ability
to just say "java linkedlist" without having to give the whole path...
oh well, i was just curious about playing with ubiquity anyway =)

On 5 Jan., 19:11, pvncad <pvn...@gmail.com> wrote:
> You may want to try javadoc command which I wrote sometime back athttp://www.geocities.com/praveena_sampige/javadoc.html.

pvncad

unread,
Jan 7, 2009, 12:39:22 PM1/7/09
to ubiquity-firefox
Sorry for not answering your original questions.

Location of templates are changed recently, I believe. In current beta
version, templates are in ubiquity/standard-feeds/search.xhtml.
Looks like you are using newer version of ubiquity than the "java"
command was written for.

BTW, I have implemented your feature request in my command. i.e "java
linkedlist" will give you preview of java.util.LinkedList.

-pvncad
Reply all
Reply to author
Forward
0 new messages