Skip to content

Instantly share code, notes, and snippets.

/x

Created February 12, 2009 16:33
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 anonymous/62707 to your computer and use it in GitHub Desktop.
Save anonymous/62707 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
author: { name: "elbarto", email: "elbarto404@gmail.com"},
description: "search d20srd.org",
name: "d20",
takes: {"d20": noun_arb_text},
preview: function( pblock, searchTerm) {
pblock.innerHTML = "Searches d20srd.org for: " + searchTerm.text;
},
execute: function( searchTerm ) {
var msg = searchTerm.text + "... loading";
var url2 = "http://www.google.com/cse?cx=015155386140379294602%3Ak9hv7ukafn4&cof=FORID%3A1&sa=GO&q=" + searchTerm.text;
Utils.openUrlInBrowser( url2 );
displayMessage( msg );
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment