Merge pull request #606 from a1usha/master

Disable 'next' keymode when memory funbox mode is active
This commit is contained in:
Jack 2020-11-21 20:00:30 +00:00 committed by GitHub
commit 91c57e461b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -355,6 +355,9 @@ function activateFunbox(funbox, mode) {
setMode("words");
setShowAllLines(true, true);
restartTest(false, true);
if (config.keymapMode === "next") {
setKeymapMode("react");
}
}
activeFunBox = funbox;
}
@ -603,6 +606,7 @@ function emulateLayout(event) {
if (isCapsLockHeld) return isASCIILetter(newKeyPreview) !== event.shiftKey;
return event.shiftKey;
}
function replaceEventKey(event, keyCode) {
const newKey = String.fromCharCode(keyCode);
event.keyCode = keyCode;
@ -891,6 +895,10 @@ $("#restartTestButton, #startTestButton").on("click", function () {
$("#wordsWrapper").addClass("hidden");
}
}, 1000);
if (config.keymapMode === "next") {
setKeymapMode("react");
}
}
});
@ -1634,6 +1642,7 @@ function showCrown() {
);
}
let resultCalculating = false;
function showResult(difficultyFailed = false) {
resultCalculating = true;
resultVisible = true;