Skip to content

Instantly share code, notes, and snippets.

@wwood
Created October 5, 2009 03:22
Show Gist options
  • Save wwood/201838 to your computer and use it in GitHub Desktop.
Save wwood/201838 to your computer and use it in GitHub Desktop.
Google Scholar searching without the preview extras
CmdUtils.CreateCommand({
names: ["scholar"],
icon: "http://www.google.com/favicon.ico",
homepage: "http://static.isnotworking.com/scholar-search.html",
description: "A short description of your command.",
author: { name: "Ben Woodcroft", email: "b.woodcroft@pgrad.unimelb.edu.au"},
license: "MPL",
help: "Searches Google Scholar for articles",
arguments: [{role:'object', nountype: noun_arb_text, label:'keywords'}],
execute: function execute(args) {
var url = "http://scholar.google.com/scholar?q={QUERY}";
var query = args.object.text;
var urlString = url.replace("{QUERY}", query);
Utils.openUrlInBrowser(urlString);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment