Created
April 19, 2012 03:04
-
-
Save lfcipriani/2418104 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
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