Skip to content

Instantly share code, notes, and snippets.

/x

Created April 13, 2009 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/94775 to your computer and use it in GitHub Desktop.
Save anonymous/94775 to your computer and use it in GitHub Desktop.
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