Skip to content

Instantly share code, notes, and snippets.

@denzuko
Created November 5, 2009 10:19
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 denzuko/226968 to your computer and use it in GitHub Desktop.
Save denzuko/226968 to your computer and use it in GitHub Desktop.
//Last.fm for Ubiquity
//This script takes your input and opens the url http://www.last.fm/listen/artist/{input}/similarartists
//Thus tuning in to the desired last.fm station
CmdUtils.CreateCommand({
name:"lastfm",
description: "Tunes into the desired last.fm station!",
icon:"http://firefm.sourceforge.net/favicon.ico",
takes: {artist: noun_arb_text},
preview: "Starts last.fm with the specified artist!",
execute: function(artist) {
var url = "http://www.last.fm/listen/artist/{QUERY}/similarartists"
var query = artist.text;
var urlString = url.replace( "{QUERY}", query);
Utils.openUrlInBrowser(urlString);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment