-
-
Save gialloporpora/72601 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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