Created
January 6, 2010 17:38
-
-
Save paulirish/270445 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
// A bookmarklet to add search ability to any github.com repo. | |
// Note: Disable Chrome Frame in IE to use this bookmarklet as github.com supports Chrome Frame | |
// @author John-David Dalton (http://www.twitter.com/jdalton) | |
javascript:void(function(){var a='';if(!$('.subnav-bar').length){a=$('form#search-form input[name=q]').val();$('.big-search').remove();$('.tabs').after('<div class="subnav-bar"></div>')}else{$('#repo-search-form').remove()}$('.subnav-bar').append('<ul style="float:right;margin-left:10px;"><li><a class="dropdown" href="#">Search by…</a><ul><li><a href="#" onclick="$(\'#choice\').val(\'code\');return false;">Code</a></li><li><a href="#" onclick="$(\'#choice\').val(\'grep\');return false;">Commit Messages</a></li><li><a href="#" onclick="$(\'#choice\').val(\'author\');return false;">Author</a></li><li><a href="#" onclick="$(\'#choice\').val(\'committer\');return false;">Committer</a></li></ul></li></ul><form id="repo-search-form" action="'+$('.pagehead.repohead h1 a')[1].href+'/search"><input name="q" value="'+a+'" type="text" class="search notnative"><input id="choice" name="choice" value="code" type="hidden"><input id="lang-value" name="langOverride" value="" type="hidden"><input id="start-value" name="start" value="" type="hidden"></form>')}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment