Revert "Fix #2660"

This reverts commit bbad4bd483.

It breaks SAN pawn moves like "e4".
pull/2676/head
Thibault Duplessis 2017-02-13 15:24:42 +01:00
parent 526b84fd60
commit d0d4218331
1 changed files with 4 additions and 4 deletions

View File

@ -8,13 +8,13 @@ function lichessKeyboardMove(opts) {
var sans = null;
var submit = function(v, force) {
var foundUci = v.length >= 2 && sans && sanToUci(v, sans);
if (sans && v.match(keyRegex)) {
opts.select(v);
clear();
} else if (foundUci) {
if (foundUci) {
if (v.toLowerCase() === 'o-o' && sans['O-O-O'] && !force) return;
opts.san(foundUci.slice(0, 2), foundUci.slice(2));
clear();
} else if (sans && v.match(keyRegex)) {
opts.select(v);
clear();
} else if (sans && v.match(fileRegex)) {
// do nothing
} else