Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
/* Based on gist: 26061 by bastos. */
names: ["code"],
icon: "",
author: {name: "Pedro Valencia", email: ""},
license: "GPL",
homepage: "",
description: "Search on Github Code Search",
help: "Search on Github Code Search",
arguments: [{role: 'object', nountype: noun_arb_text, label: 'function'}],
preview: function preview(pblock, args) {
searchText = jQuery.trim(args.object.text);
if(searchText.length <= 0) {
pblock.innerHTML = "Search on github codesearch";
var previewTemplate = "Search on Github: ${query}";
var previewData = {query: searchText};
pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
execute: function execute(args) {
var url = "{QUERY}";
var urlString = url.replace("{QUERY}", args.object.text);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment