fix: enter not working as space in 58008 funbox if quick restart was set to enter

This commit is contained in:
Miodec 2024-05-06 13:35:43 +02:00
parent bc7ca45a12
commit 9714ac95c5
2 changed files with 7 additions and 8 deletions

View file

@ -974,8 +974,9 @@ $(document).on("keydown", async (event) => {
if (Config.mode === "zen") {
//do nothing
} else if (
!TestWords.hasNewline ||
(TestWords.hasNewline && event.shiftKey)
(!TestWords.hasNewline && !Config.funbox.includes("58008")) ||
((TestWords.hasNewline || Config.funbox.includes("58008")) &&
event.shiftKey)
) {
// in case we are in a long test, setting manual restart
if (event.shiftKey) {
@ -988,11 +989,6 @@ $(document).on("keydown", async (event) => {
TestLogic.restart({
event,
});
} else {
setWordsInput(" " + TestInput.input.current);
if (Config.tapeMode !== "off") {
TestUI.scrollTape();
}
}
}

View file

@ -62,7 +62,10 @@ export async function update(): Promise<void> {
}
}
if (TestWords.hasNewline && Config.quickRestart === "enter") {
if (
(TestWords.hasNewline || Config.funbox.includes("58008")) &&
Config.quickRestart === "enter"
) {
$(".pageTest #testModesNotice").append(
`<div class="textButton noInteraction"><i class="fas fa-level-down-alt fa-rotate-90"></i>shift + enter to restart</div>`
);