* @type {Number}
* @const
* @private */
-var SCRIPT_VERSION = 2016113007;
+var SCRIPT_VERSION = 2016113008;
/**
* The current backend URL.
update_num_viewers(num_viewers);
} else {
console.log("Received invalid update, waiting five seconds and trying again.");
- location.reload(true);
+ setTimeout(function() { location.reload(true); }, 5000);
}
// Next update.
'(<a class="move" href="javascript:collapse_history(true)">collapse</a>) ' +
print_pv(0));
}
+ update_move_highlight();
}
/**
var tbl = $("#refutationlines");
tbl.empty();
+ if (display_lines.length < 2) {
+ return;
+ }
+
// Find out where the lines start from.
var base_line = [];
var base_scores = display_lines[1].scores;
if (!data['refutation_lines'] ||
!data['refutation_lines'][nonstupid_moves[i]] ||
!data['refutation_lines'][nonstupid_moves[i]]['pv'] ||
- data['refutation_lines'][nonstupid_moves[i]]['pv'].length < 1) {
+ data['refutation_lines'][nonstupid_moves[i]]['pv'].length < 2) {
// Incomplete PV, abort.
response = undefined;
break;
}
// FIXME: at some widths, calling sparkline() seems to push
// #scorecontainer under the board.
+ $('#scorespark').unbind('sparklineClick');
$("#scorespark").sparkline(scores, {
type: 'bar',
zeroColor: 'gray',
return format_tooltip(data, fields[0].offset + first_move_num - 1);
}
});
+ $('#scorespark').unbind('sparklineClick');
$('#scorespark').bind('sparklineClick', function(event) {
var sparkline = event.sparklines[0];
var region = sparkline.getCurrentRegionFields();