Skip to content

Instantly share code, notes, and snippets.

@justinmakaila
Last active December 27, 2015 23:19
Show Gist options
  • Select an option

  • Save justinmakaila/7405493 to your computer and use it in GitHub Desktop.

Select an option

Save justinmakaila/7405493 to your computer and use it in GitHub Desktop.
Search GitHub repositories in Backtick!
var searchKey = prompt("Enter keywords for repositories:");
var array = searchKey.split(' ');
var urlString = "https://github.com/search?q=";
var suffix = "&ref=cmdform";
for (var i = 0; i < array.length; i++) {
var key = array[i].replace("'", "");
if (i != (array.length - 1))
urlString += key + '+';
else
urlString += key;
}
urlString += suffix
window.location.replace(urlString);
{
"name": "GitHub Search",
"description": "Search GitHub from wherever you are on the web!",
"icon": "https://github.global.ssl.fastly.net/images/modules/logos_page/GitHub-Mark.png",
"link": "http://github.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment