Skip to content

Instantly share code, notes, and snippets.

@winkerVSbecks
Created December 25, 2008 20:41
Show Gist options
  • Save winkerVSbecks/39950 to your computer and use it in GitHub Desktop.
Save winkerVSbecks/39950 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "last.fm",
author: { name: "Juan Pablo Zapata", email: "[email protected]" },
homepage: "http://www.pendor.com.ar/ubiquity",
description: "Muestra los ultimos temas de un usuario en Last.fm.",
help: "<b>Uso:</b> lastfm <i>nombre del usuario</i>",
icon: "http://cdn.last.fm/flatness/favicon.ico",
takes: {"nombre de usuario": noun_arb_text},
//modifiers: {"mostrar": noun_arb_text},
preview: function(pBlock, campo, mods) {
var busqueda = campo.text;
//var mostrar = mods.mostrar.text;
if( busqueda == "" )
busqueda = "un usuario";
pBlock.innerHTML = "Muestra los ultimos 10 temas de " + busqueda + " en Last.FM.";
if(campo.text.length < 1)
return;
extraer_pistas(pBlock, busqueda);
},
execute: function( campo ) {
var perfil = "http://www.last.fm/artist/" + campo.text;
Utils.openUrlInBrowser(perfil);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment