Skip to content

Instantly share code, notes, and snippets.

@frason
Created October 26, 2009 01:13
Show Gist options
  • Save frason/218357 to your computer and use it in GitHub Desktop.
Save frason/218357 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
names: ["rottentomatoes"],
icon: "http://www.mozilla.com/favicon.ico",
description: "Searches RottenTomatoes for Movie titles.",
help: "type rottentomatoes then your movie name.",
author: {name: "Jason Frasier", email: "jfrasier@gmail.com"},
license: "GPL",
homepage: "http://labs.mozilla.com/",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function previewSearchRT(pblock, args) {
pblock.innerHTML = "Your input is <b>" + args.object.html + "</b>.";
},
execute: function executeSearchRT(args) {
Utils.openUrlInBrowser("http://www.rottentomatoes.com/search/full_search.php?search=" + args.object.text);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment