Skip to content

Instantly share code, notes, and snippets.

@Nemolog
Created January 8, 2009 10:09
Show Gist options
  • Save Nemolog/44669 to your computer and use it in GitHub Desktop.
Save Nemolog/44669 to your computer and use it in GitHub Desktop.
CodeSearch x Ubiquity
CmdUtils.CreateCommand({
//nome del comando
name: "CodeSearch",
homepage: "http://bytezone.plumfake.net/",
author: { name: "Mauro Rubin", email: "mauro.rubin@plumfake.net"},
help: "Se ne volete saperne di più andate su http://bytezone.plumfake.net/"
//definisco il tipo di parametro passato
takes: {"qualcosa da ricercare": noun_arb_text},
//descrizione sotto...
preview: function( pblock, ricerca ) {
//aggiorno la console
pblock.innerHTML = "Ricerca automatica su Google Code Search di:" + ricerca.text;
},
//eseguzione
execute: function( ricerca ) {
var GCS = "http://www.google.com/codesearch?q=" + ricerca.text + "pippo&hl=it&btnG=Cerca+codice";
Utils.openUrlInBrowser(GCS);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment