mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 21:33:40 +08:00
fixed word highlight and read ahead not liking each other #723
This commit is contained in:
parent
ee4ddc7a17
commit
0757c11d71
2 changed files with 10 additions and 2 deletions
|
@ -331,6 +331,11 @@ async function activateFunbox(funbox, mode) {
|
|||
settingsGroups.keymapMode.updateButton();
|
||||
restartTest();
|
||||
}
|
||||
|
||||
if (funbox === "read_ahead") {
|
||||
setHighlightMode("letter", true);
|
||||
restartTest();
|
||||
}
|
||||
} else if (mode === "script") {
|
||||
if (funbox === "tts") {
|
||||
$("#funBoxTheme").attr("href", `funbox/simon_says.css`);
|
||||
|
|
|
@ -810,8 +810,11 @@ function toggleShowLiveAcc() {
|
|||
}
|
||||
|
||||
function setHighlightMode(mode, nosave) {
|
||||
if (activeFunBox === "nospace" && mode === "word") {
|
||||
Misc.showNotification("Can't use word highlight with nospace funbox", 3000);
|
||||
if (
|
||||
mode === "word" &&
|
||||
(activeFunBox === "nospace" || activeFunBox === "read_ahead")
|
||||
) {
|
||||
Misc.showNotification("Can't use word highlight with this funbox", 3000);
|
||||
return;
|
||||
}
|
||||
if (mode == null || mode == undefined) {
|
||||
|
|
Loading…
Reference in a new issue