Skip to content

Instantly share code, notes, and snippets.

@folarb
Last active April 20, 2018 17:08
Show Gist options
  • Save folarb/34044 to your computer and use it in GitHub Desktop.
Save folarb/34044 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "gimage",
icon: "http://www.google.com/favicon.ico",
author: {
name: "Robert B****",
email: "folarb@gmail.com"
},
description: "Searches Google Image for your words.",
help: "enter gimage + [what you want to search for] amd hit return to search Google for images",
takes: {
"search": noun_arb_text
},
preview: function(html, search) {
html.innerHTML = "search Google Image for <b>"+search.text+"</b>";
},
execute: function(search) {
var url = "http://images.google.com/images?q=" + search.text;
Utils.openUrlInBrowser(url);
}
});
CmdUtils.CreateCommand({
name: "gvideo",
icon: "http://www.google.com/favicon.ico",
author: {
name: "Robert Baart",
email: "folarb@gmail.com"
},
description: "Searches Google Video for your words.",
help: "enter gvideo + [what you want to search for] amd hit return to search Google for videos",
takes: {
"search": noun_arb_text
},
preview: function(html, search) {
html.innerHTML = "search Google Video for <b>"+search.text+"</b>";
},
execute: function(search) {
var url = "http://video.google.com/videosearch?q=" + search.text;
Utils.openUrlInBrowser(url);
}
});
CmdUtils.CreateCommand({
name: "gnews",
icon: "http://www.google.com/favicon.ico",
author: {
name: "Robert Baart",
email: "folarb@gmail.com"
},
description: "Searches Google News for your words.",
help: "enter gnews + [what you want to search for] amd hit return to search Google for news",
takes: {
"search": noun_arb_text
},
preview: function(html, search) {
html.innerHTML = "search Google News for <b>"+search.text+"</b>";
},
execute: function(search) {
var url = "http://news.google.com/news?q=" + search.text;
Utils.openUrlInBrowser(url);
}
});
CmdUtils.CreateCommand({
name: "add-on",
icon: "https://addons.mozilla.org/favicon.ico",
author: {
name: "Robert Baart",
email: "folarb@gmail.com"
},
description: "Searches Mozilla Add-ons for your words.",
help: "enter add-on + [what you want to search for] amd hit return to search Mozilla for add-ons",
takes: {
"search": noun_arb_text
},
preview: function(html, search) {
html.innerHTML = "search Mozilla Add-ons for <b>"+search.text+"</b>";
},
execute: function(search) {
var url = "https://addons.mozilla.org/en-US/firefox/search?q=" + search.text + "&cat=all";
Utils.openUrlInBrowser(url);
}
});
CmdUtils.CreateCommand({
name: "theme",
icon: "https://addons.mozilla.org/favicon.ico",
author: {
name: "Robert Baart",
email: "folarb@gmail.com"
},
description: "Searches Mozilla Add-ons: Themes for your words.",
help: "enter theme + [what you want to search for] amd hit return to search Mozilla for themes",
takes: {
"search": noun_arb_text
},
preview: function(html, search) {
html.innerHTML = "search Mozilla Add-ons: Themes for <b>"+search.text+"</b>";
},
execute: function(search) {
var url = "https://addons.mozilla.org/en-US/firefox/search?q=" + search.text + "&cat=2%2C0";
Utils.openUrlInBrowser(url);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment