Created
November 28, 2013 08:04
-
-
Save plucury/7688655 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function displayMyData (data, chinese) { | |
$('.ajaxLoader').hide(); | |
$('.headerRight').html(data.user.name); | |
var params = { | |
username: data.user.name | |
} | |
_.extend(params, data.global); | |
if (data.user.stats.length < 1) { | |
params.personalHours = 0; | |
params.personalXrp = 0; | |
} else { | |
params.personalHours = Math.round(data.user.stats['RunTime'] / 60.0 / 60.0); | |
params.personalXrp = 0; | |
} | |
if (chinese) { | |
$('#content').html(_.template($('#statsPageTemplateChinese').html(), params)); | |
} else { | |
$('#content').html(_.template($('#statsPageTemplate').html(), params)); | |
} | |
$('.ajaxLoader').hide(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment