diff --git a/onlinetichu-counter.js b/onlinetichu-counter.js
index 86f8c76..5378c53 100644
--- a/onlinetichu-counter.js
+++ b/onlinetichu-counter.js
@@ -105,7 +105,7 @@ function injectCounter() {
davidProtectionButton.className = "btn btn-success btn-xs";
davidProtectionButton.id = "davidProtection";
davidProtectionButton.type = "button";
- davidProtectionButton.innerHTML = 'David protection: Yes';
+ davidProtectionButton.innerHTML = 'David protection: Off';
var showRemainingButton = document.createElement('button');
showRemainingButton.className = "btn btn-info btn-xs";
@@ -400,8 +400,10 @@ function injectCounter() {
ot.$fold.unbind();
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");
+ if(ot.$passCards().length != 0 && !otc.davidProtectionTriggered) {
+ console.log('david protection triggered');
+ ot.$gameMessage.text("Selected cards detected. Press again to fold!");
+ ot.HorizontalAlign(ot.$gameMessage);
otc.davidProtectionTriggered = true;
return;
}
@@ -411,11 +413,6 @@ function injectCounter() {
$(this).hide();
});
- ot.$fold.hide().click(function () {
- ot.action.Fold();
- $(this).hide();
- });
-
MyTableState = (function() {
var cachedFunction = ot.reaction.TableState;