Skip to content

Instantly share code, notes, and snippets.

/x
Created Apr 13, 2009

Embed
What would you like to do?
Ubiquity command that displays song currently being played on Radio Paradise
CmdUtils.CreateCommand({
name:"rp",
_getInfo: function(){
var info = "";
jQuery.get('http://www2.radioparadise.com/mini_playlist.php', rpHtmlCallback);
function rpHtmlCallback(page)
{
var moreInfo = jQuery("a", page);
this.info = moreInfo.eq(0).text();
}
return info;
},
execute: function(){
jQuery.get('http://www2.radioparadise.com/mini_playlist.php', rpHtmlCallback);
function rpHtmlCallback(page)
{
var moreInfo = jQuery("a", page);
displayMessage(moreInfo.eq(0).text());
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.