Skip to content

Commit

Permalink
hi
Browse files Browse the repository at this point in the history
  • Loading branch information
amitburst committed Jul 20, 2014
1 parent eedd262 commit 318a8fd
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions webapp/js/viewmodel.profile.js
@@ -1,15 +1,10 @@
function ProfileViewModel() {
var self = this;
var facebook = new Facebook();
var user = null;
var cursor = new Blinker('profile-title-cursor', 500);
self.title = new Typer('');
self.points = new Typer('');

facebook.getUserData(function(data) {
user = data;
});

self.onClickProfile = function() {
// Nada?
};
Expand All @@ -21,9 +16,10 @@ function ProfileViewModel() {

self.onSwitchTo = function(done) {
self.title.write(app.getUser().name, 50, function() {
self.points.write('Score: ' + user.score, 50);
facebook.getUserData(function(data) {
self.points.write('Score: ' + data.score, 50);
});
});
console.log(app.getUser());
cursor.start()
done();
};
Expand Down

0 comments on commit 318a8fd

Please sign in to comment.