Skip to content

Instantly share code, notes, and snippets.

/x
Created Jun 14, 2009

Embed
What would you like to do?
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
You can’t perform that action at this time.