Skip to content

Instantly share code, notes, and snippets.

CmdUtils.CreateCommand({
name: "translatepage",
icon: "http://www.google.com/favicon.ico",
author: { name: "Nanya Bizuidenhoud", email: "netsuke87@yahoo.com"},
description: "Automatically translate the current page to english using google translate",
help: "Just type translatepage in the ubiquity interface and push enter to translate",
preview: function( pblock) {
pblock.innerHTML = "Automatically detect the language of the current page and translate it into English";
},
//Ubiquity command to:
//1. search for an article on How Stuff Works or
//2. look at a random article from How Stuff Works
CmdUtils.CreateCommand({
name:"hsw",
takes:{"searchTerm":noun_arb_text},
icon:"http://www.howstuffworks.com/favicon.ico",
author: { name: "Nanya Bizuidenhoud", email: "netsuke87@yahoo.com"},
description: "Get a random article from <a href=\"http://www.howstuffworks.com\">Howstuffworks.com</a> howstuffworks or search for a given article",
help: "Type r or R for a random article or simply enter a keyword to search for a specific article",
//Google site search ubiquity command
//Search the current webpage using google site search
CmdUtils.CreateCommand({
name: "google-site-search",
icon: "http://www.google.com/favicon.ico",
author: { name: "Nanya Bizuidenhoud", email: "netsuke87@yahoo.com"},
description: "Search the current website for the given keyword using google site search",
help: "Simply type google-site-search in the ubiquity command interface, input the keyword to search for and the website you are looking at will be searched using google site search for the specified keyword",
takes: {"keyword": noun_arb_text},
preview: function( pblock, searchTerm) {