Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function onMessage(msg) {
// messages stanzas are converted to JSON and then prepended to the correspondent panel in the UI
var result = Collecta.processItem($(msg));
for (var i=0; i < result.length; i++) {
$('#term'+ result[i].term +"panel")
.prepend("<p>["+result[i].category+"] - <a href=\""+result[i].url+"\" target=\"_blank\" title=\" Access "+terms[result[i].term]+" information\">"+result[i].title+"</a><br />..."+result[i].description+"...<br />Published in "+result[i].published+"</p>");
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment