{"size": 1205, "ext": "js", "max_stars_repo_path": "js/drivers/github.js", "max_stars_repo_name": "andrewsuzuki/pursue", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "js/drivers/github.js", "max_issues_repo_name": "andrewsuzuki/pursue", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/drivers/github.js", "max_forks_repo_name": "andrewsuzuki/pursue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.435483871, "max_line_length": 68, "alphanum_fraction": 0.6705394191}
function Github() {
}

Github.prototype.isApplicable = function() {
	return false;
};

Github.prototype.newTabOkay = function() {
	return true;
};

Github.prototype.setup = function() {
};

Github.prototype.getResults = function() {
	return $('body ul.repo-list li.repo-list-item');
};

Github.prototype.countResults = function() {
	return this.getResults().length;
};

Github.prototype.getResult = function(n, results) {
	results = results || this.getResults();
	var result = results.eq(n);
	if (!result) {
		return false;
	}
	return result;
};

Github.prototype.highlightResult = function(n) {
	var results = this.getResults();
	var result = this.getResult(n, results);
	// reset others
	results.each(function(i) {
		$(this).css('background', 'white');
	});
	if (result) {
		// highlight given
		result.css('background', '#FFFFD1');
	}
};

Github.prototype.resultUrl = function(n) {
	var result = this.getResult(n);
	if (!result) {
		return false;
	}
	var href = result.find('h3.repo-list-name a').first().attr('href');
	if (!href.length) {
		return false;
	}
	return href;
};

Github.prototype.search = function() {
	$('input.js-site-search-focus').first().focus();
};

pursue.tryDriver(new Github());
