Disabled the repeat test button in zen mode

This commit is contained in:
Jack92829 2021-01-19 12:50:15 +11:00
parent d41f9b222c
commit b41bc01017

View file

@ -4797,12 +4797,20 @@ $(document.body).on("click", "#showWordHistoryButton", () => {
});
$(document.body).on("click", "#restartTestButtonWithSameWordset", () => {
if (config.mode == "zen") {
Notifications.add("Repeat test disabled in zen mode");
return;
}
manualRestart = true;
restartTest(true);
});
$(document).on("keypress", "#restartTestButtonWithSameWordset", (event) => {
if (config.mode == "zen") {
Notifications.add("Repeat test disabled in zen mode");
return;
}
if (event.keyCode == 13) {
restartTest(true);
}