Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added a check for the opt.in for in the users repositories

  • Loading branch information...
commit 56f65e5d876e7e8e1e63ae7900e6e9b5c098770f 1 parent 1e45a8e
@nisbus authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 js/githubresume.js
View
9 js/githubresume.js
@@ -224,9 +224,14 @@ var run = function() {
github_user_repos(username, function(data) {
var sorted = [],
languages = {},
+ optedIn = false,
popularity;
+
$.each(data, function(i, repo) {
+ if (repo.name == 'github.resume.opt_in') {
+ optedIn = true;
+ }
if (repo.fork !== false) {
return;
}
@@ -242,7 +247,9 @@ var run = function() {
popularity = repo.watchers + repo.forks;
sorted.push({position: i, popularity: popularity, info: repo});
});
-
+ if (!optedIn)
+ throw 'User has not opted in to this service.';
+
function sortByPopularity(a, b) {
return b.popularity - a.popularity;
};
Please sign in to comment.
Something went wrong with that request. Please try again.