Skip to content

Instantly share code, notes, and snippets.

/x

Created June 14, 2009 01:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/129512 to your computer and use it in GitHub Desktop.
Save anonymous/129512 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "radio",
icon: "http://lh4.ggpht.com/_V1nkdxCYp58/SLsa5owefJI/AAAAAAAAFgM/DqeH6GKFXQI/lastfm.gif",
homepage: "www.last.fm",
author: {name: "Matthew Garrett", email: "arken0493@gmail.com"},
license: "GPL",
description: "Last.FM radio starter",
help: "Type radio, then the artist you want to hear.",
takes: {"input": /.*/},
preview: function(pblock, input) {
pblock.innerHTML = "Radio for Artist: " + input.text + "</b>.";
},
execute: function(input) {
displayMessage("Starting " + input.text + " radio. Enjoy!");
Utils.openUrlInBrowser( "http://www.last.fm/listen/artist/" + input.text + "/similarartists");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment