forcing letter highlight for nospace funbox

This commit is contained in:
Jack 2020-12-07 17:34:41 +00:00
parent e3abc6e3c4
commit 520b8e13a1
2 changed files with 5 additions and 0 deletions

View file

@ -349,6 +349,7 @@ function activateFunbox(funbox, mode) {
}
} else if (funbox === "nospace") {
$("#words").addClass("nospace");
setHighlightMode("letter", true);
restartTest(false, true);
}
activeFunBox = funbox;

View file

@ -768,6 +768,10 @@ function toggleShowLiveWpm() {
}
function setHighlightMode(mode, nosave) {
if (activeFunBox === "nospace" && mode === "word") {
Misc.showNotification("Can't use word highlight with nospace funbox", 3000);
return;
}
if (mode == null || mode == undefined) {
mode = "letter";
}