Skip to content

Instantly share code, notes, and snippets.

@vingran
Created March 3, 2009 23:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vingran/73615 to your computer and use it in GitHub Desktop.
Save vingran/73615 to your computer and use it in GitHub Desktop.
/*Commande pour la recherche Allociné*/
CmdUtils.CreateCommand({
names: ['allocine'],
icon: "http://www.allocine.fr/favicon.ico",
homepage: "http://vingran.com/",
author: { name: "v!ngran", email: ""},
license: "GPL",
description: "Recherche sur le site d'Allociné",
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'search term'}],
preview: function( pblock, input ) {
var template = "Rechercher <b>${name}</b> sur Allocine.fr";
pblock.innerHTML = CmdUtils.renderTemplate(template, {"name": input.object.text});
},
execute: function(input) {
Utils.openUrlInBrowser("http://www.allocine.fr/recherche/?motcle="+input.object.text, false);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment