fixed a bug with time popup breaking time itself

This commit is contained in:
Jack 2020-08-16 20:59:23 +01:00
parent 09a09b043d
commit 63b21f63dc

View file

@ -3176,8 +3176,8 @@ $(document).on("click", "#top .config .wordCount .text-button", (e) => {
});
$(document).on("click", "#top .config .time .text-button", (e) => {
time = $(e.currentTarget).attr("timeConfig");
if (time == "custom") {
let mode = $(e.currentTarget).attr("timeConfig");
if (mode == "custom") {
// let newTime = prompt("Custom time in seconds");
// if (newTime !== null && !isNaN(newTime) && newTime > 0 && newTime <= 3600) {
// changeTimeConfig(newTime);
@ -3192,7 +3192,7 @@ $(document).on("click", "#top .config .time .text-button", (e) => {
// }
showCustomMode2Popup("time");
} else {
changeTimeConfig(time);
changeTimeConfig(mode);
manualRestart = true;
restartTest();