diff --git a/manifest.json b/manifest.json
index df47359..73fde8c 100644
--- a/manifest.json
+++ b/manifest.json
@@ -3,7 +3,7 @@
"name": "__MSG_appName__",
"short_name": "__MSG_appShortName__",
"description": "__MSG_appDescription__",
- "version": "0.5.11",
+ "version": "0.5.12",
"homepage_url": "http://re-coders.com/chessbot",
"default_locale": "en",
"icons": {
diff --git a/scripts/chess_controller.js b/scripts/chess_controller.js
index e4da7f2..6da614e 100644
--- a/scripts/chess_controller.js
+++ b/scripts/chess_controller.js
@@ -335,7 +335,7 @@ var PageManager = function($, window, cookieManager){
$('div.top-level-nav').after(// '
' +
'');
}
@@ -391,26 +391,29 @@ var PageManager = function($, window, cookieManager){
var ableText = enableSuggestion ? 'Enabled' : 'Disabled';
var ableIcon = enableSuggestion ? 'robot-20.png' : 'norobot-20.png';
if (isBetaDesign) {
- $(control).text(ableText);
+ $('#' + botMessageEnabledId).text(ableText);
$('#' + botImgId)
.attr('title', ableText)
.attr('src', 'https://raw.githubusercontent.com/recoders/chessbot/master/images/' + ableIcon);
+ if(enableSuggestion) { $('#' + botTextId).show(); }
+ else { $('#' + botTextId).hide(); }
} else {
$(control).addClass('success')
.children('img').attr('src', 'https://raw.githubusercontent.com/recoders/chessbot/master/images/' + ableIcon);
}
- cookie.set(eChessCookie, enableSuggestion ? '1' : '0');
+ cookieManager.set(eChessCookie, enableSuggestion ? '1' : '0');
}
function standartPagePreparations(engine) {
- $('#' + botNoticeId)
- .on('click', function(e) {
- toggleSuggestionStandart(this);
- return false;
- });
+ var buttonId = isBetaDesign ? botIconId : botNoticeId;
+ $('#' + buttonId)
+ .on('click', function(e) {
+ toggleSuggestionStandart(this);
+ return false;
+ });
- enableSuggestion = cookieManager.get(eChessCookie) == '0';
- toggleSuggestionStandart($('#' + botNoticeId)[0]);
+ enableSuggestion = cookieManager.get(eChessCookie) == '0';
+ toggleSuggestionStandart($('#' + botNoticeId)[0]);
}
page.createStandartBot = function (botEngine, isBeta) {