Added a check for missing http:// in the links.

This commit is contained in:
David Coallier
2011-02-06 16:35:11 +00:00
parent 3186973f79
commit f046b8af61

View File

@@ -60,11 +60,13 @@ var run = function() {
var since = new Date(data.user.created_at);
since = since.getFullYear();
var addHttp = data.user.blog.indexOf('http') < 0 ? 'http://' : '';
var view = {
name: data.user.name,
email: data.user.email,
created_at: data.user.created_at,
blog: data.user.blog,
blog: addHttp + data.user.blog,
location: data.user.location,
repos: data.user.public_repo_count,
plural: data.user.public_repo_count > 1 ? 'repositories' : 'repository',