Skip to content

Instantly share code, notes, and snippets.

@gialloporpora
Created March 2, 2009 03:32
Show Gist options
  • Save gialloporpora/72601 to your computer and use it in GitHub Desktop.
Save gialloporpora/72601 to your computer and use it in GitHub Desktop.
/* Unfortunatelly the JSON API not show a description of the story, to have it it must to parse the RSS data */
/* I must add the ability to search in localized languages, tomorrow */
CmdUtils.CreateCommand({
name: "bloglines-search",
icon: "http://www.bloglines.com/favicon.ico",
takes: {input : noun_arb_text},
preview: function(pblock, input) {
CmdUtils.previewAjax( pblock, {url: "http://www.bloglines.com/search",
type: "GET",
data: {q : input.text, s : "fr", pop: "l",news:"m", format:"json"},
success: function( data ){
var html="<ol>";
for (i in data.items){
html_item=CmdUtils.renderTemplate('<li><a href="${url}">${title}</a></li>', data.items[i]);
html+=html_item;
}
html+="</ol>";
pblock.innerHTML=html;
},
dataType: "json"});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment