diff --git a/onlinetichu-counter.js b/onlinetichu-counter.js index fcb1321..8901b7d 100644 --- a/onlinetichu-counter.js +++ b/onlinetichu-counter.js @@ -1,6 +1,6 @@ // ==UserScript== // @name onlinetichu.com card counter -// @version 1.1.0 +// @version 1.1.1 // @description automatically count cards at onlinetichu.com // @author kesslermaximilian // @match *://*.onlinetichu.com/Site/Game/Table/* @@ -396,7 +396,7 @@ function injectCounter() { // overwrite functionality of fold button ot.$fold.unbind(); - ot.$fold.click()(function () { + ot.$fold.hide().click(function () { if (otc.davidProtection) { if(ot.$passCards.length != 0 && !otc.davidProtectionTriggered) { ot.$gameMessage.text("You have selected cards to play but folded. Are you sure? Press fold again to fold"); @@ -404,7 +404,7 @@ function injectCounter() { return; } } - ot.action.fold(); + ot.action.Fold(); otc.davidProtectionTriggered = false; $(this).hide(); }); @@ -436,15 +436,15 @@ function injectCounter() { otc.action.drawPlayedCards(); - console.log('reached smartFold point'); +// console.log('reached smartFold point'); $(message.Table.Players).each(function () { if (this.Username == ot.$Username.val()) { - console.log('found player'); +// console.log('found player'); if (message.Table.Turn == this.Position) { - console.log('my turn!'); +// console.log('my turn!'); if (this.Cards.length < 4 && this.Cards.length < message.Table.TableCards.length) { - console.log('obvious that have to fold now'); if (otc.smartFold) { + console.log('smart fold triggered'); ot.action.Fold(); } }