Skip to content

Instantly share code, notes, and snippets.

@rixth
Created February 3, 2011 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rixth/809168 to your computer and use it in GitHub Desktop.
Save rixth/809168 to your computer and use it in GitHub Desktop.
var C = twttr.constants.noob;
B = B || twttr.currentUser;
if (B && twttr.decider.isAvailable("flock")) {
if (B.statusesCount == 0) {
if (B.followersCount > 49) {
return C.notNoob
}
if (B.friendsCount === 0) {
return (B.followersCount ? C.invited : C.total)
} else {
if (B.followersCount || B.friendsCount > 9) {
return C.silent
}
return C.friendless
}
} else {
if (B.friendsCount > 9 || (B.friendsCount === 0 && B.followersCount > 49)) {
return C.notNoob
}
if (B.friendsCount === 0) {
return (B.followersCount ? C.popular : C.talking)
} else {
return (B.followersCount ? C.struggling : C.lonely)
}
}
}
return C.notNoob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment