Skip to content

Commit

Permalink
Also bind to reshow card counts in text mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
drheld committed Mar 6, 2012
1 parent 72a47d2 commit 8f98128
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions card_counts.js
Expand Up @@ -15,6 +15,15 @@ function setupPerPlayerCardCounts() {

if ($('#chat ~ a[href^="/mode/"]').text() == "images") {
setupPerPlayerTextCardCounts();

// Setup the counts again whenever the table is recreated.
$("#supply").bind("DOMNodeInserted", function(e) {
if (e.target.constructor == HTMLTableElement) {
if ($('#player1_copper').length == 0) {
setupPerPlayerTextCardCounts();
}
}
});
} else {
setupPerPlayerImageCardCounts('kingdom');
setupPerPlayerImageCardCounts('basic');
Expand Down

0 comments on commit 8f98128

Please sign in to comment.