diff --git a/app/views/analyse/replay.scala.html b/app/views/analyse/replay.scala.html
index 2a235af1d3..7d6c6c264a 100644
--- a/app/views/analyse/replay.scala.html
+++ b/app/views/analyse/replay.scala.html
@@ -32,8 +32,7 @@ i18n: @round.jsI18n()
- h/l or ←/→ move backward/forward
- j/k or ↑/↓ go to start/end
- - i/o go to previous/next mistake
- - p show/hide comments
+ - c show/hide comments
You can also scroll over the board to move in the game.
diff --git a/ui/analyse/src/ctrl.js b/ui/analyse/src/ctrl.js
index 21d32c940e..3ac4abd36c 100644
--- a/ui/analyse/src/ctrl.js
+++ b/ui/analyse/src/ctrl.js
@@ -17,7 +17,8 @@ module.exports = function(cfg, router, i18n, onChange) {
path: initialPath,
pathStr: treePath.write(initialPath),
situation: null,
- continue: false
+ continue: false,
+ comments: true
};
var situationCache = {};
diff --git a/ui/analyse/src/keyboard.js b/ui/analyse/src/keyboard.js
index 80e822bc5c..c838aae137 100644
--- a/ui/analyse/src/keyboard.js
+++ b/ui/analyse/src/keyboard.js
@@ -30,4 +30,13 @@ module.exports = function(ctrl) {
control.last(ctrl);
m.redraw();
}));
+ k.bind('c', preventing(function() {
+ ctrl.vm.comments = !ctrl.vm.comments;
+ if (!ctrl.vm.comments && ctrl.vm.path.length > 1) {
+ path = [ctrl.vm.path[0]];
+ path[0].variation = null;
+ ctrl.jump(path);
+ }
+ m.redraw();
+ }));
};
diff --git a/ui/analyse/src/view.js b/ui/analyse/src/view.js
index da95f225e7..21e2613be7 100644
--- a/ui/analyse/src/view.js
+++ b/ui/analyse/src/view.js
@@ -78,6 +78,7 @@ function renderOpening(ctrl, opening) {
}
function renderMeta(ctrl, move, path) {
+ if (!ctrl.vm.comments) return;
var opening = ctrl.data.game.opening;
opening = (move && opening && opening.size == move.ply) ? renderOpening(ctrl, opening) : null;
if (!move || (!opening && !move.comments.length && !move.variations.length)) return;