Created
September 10, 2009 13:21
-
-
Save bogado/184546 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["site search"], | |
icon: "http://www.google.com/favicon.ico", | |
description: "Search, using google, on the current site only.", | |
author: {name: "Victor Bogado", email: "victor@bogado.net"}, | |
license: "GPL", | |
arguments: [{role: 'object', nountype: noun_arb_text}], | |
preview: function preview(pblock, args) { | |
pblock.innerHTML = "Search <b>" + args.object.html + "</b> on " + CmdUtils.getDocument().location.host + "."; | |
}, | |
execute: function execute(args) { | |
Utils.openUrlInBrowser("http://www.google.com/search?q=" + args.object.html + "+site:" + CmdUtils.getDocument().location.host); | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment