From a6c2168ed687076d2406815cd8f229ece72f6514 Mon Sep 17 00:00:00 2001 From: David Coallier Date: Sun, 6 Feb 2011 21:39:33 +0000 Subject: [PATCH] Added a fun "Papa Bear" name in the event one doesnt have a name. Added a title modification. --- js/githubresume.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/githubresume.js b/js/githubresume.js index fe13d00..02590df 100644 --- a/js/githubresume.js +++ b/js/githubresume.js @@ -67,8 +67,13 @@ var run = function() { } } + var name = 'Papa Bear'; + if (data.user.name !== null && data.user.name !== undefined) { + name = data.user.name; + } + var view = { - name: data.user.name, + name: name, email: data.user.email, created_at: data.user.created_at, location: data.user.location, @@ -89,6 +94,7 @@ var run = function() { var template = data; var html = Mustache.to_html(template, view); $('#resume').html(html); + document.title = name + "'s Résumé"; } }); });