Skip to content

Commit

Permalink
Adding addition logs to debug voting.
Browse files Browse the repository at this point in the history
  • Loading branch information
cballou committed Apr 10, 2012
1 parent 62fe4d2 commit 7edd524
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tt-squared.js
Expand Up @@ -854,6 +854,8 @@ window.TTFM_SQ = null;
* Update vote counters on the stats tab.
*/
var updateCounters = function() {
_log('Pre counter update');

// recalculate scores
votes.score = 100 * (votes.upvotes / votes.votes).toFixed(2);
votes.current.score = 100 * (votes.current.upvotes / votes.current.votes).toFixed(2);
Expand Down Expand Up @@ -904,6 +906,7 @@ window.TTFM_SQ = null;
}

_log('Performing vote updating actions.');
_log(e.room.metadata.votelog);

// perform actions
recordVote(e.room.metadata.votelog[0]);
Expand Down Expand Up @@ -1711,6 +1714,7 @@ window.TTFM_SQ = null;
requestNotificationPermission();
} else {
// handle web worker in chrome (via toobify.com)
/*
if ("webkitNotifications" in window) {
// create a new worker
var worker = new SharedWorker('https://github.com/cballou/Turntable.FM-Squared/raw/master/notifications/worker.js');
Expand All @@ -1728,6 +1732,7 @@ window.TTFM_SQ = null;
// start the shared worker connection
worker.start();
}
*/
}
}

Expand Down

0 comments on commit 7edd524

Please sign in to comment.