diff --git a/frontend/src/js/popups/custom-test-duration-popup.js b/frontend/src/js/popups/custom-test-duration-popup.js index 01864cd66..dbabc3994 100644 --- a/frontend/src/js/popups/custom-test-duration-popup.js +++ b/frontend/src/js/popups/custom-test-duration-popup.js @@ -138,3 +138,10 @@ $("#customTestDurationPopup input").keyup((e) => { $("#customTestDurationPopup .button").click(() => { apply(); }); + +$(document).on("click", "#top .config .time .text-button", (e) => { + let mode = $(e.currentTarget).attr("timeConfig"); + if (mode == "custom") { + show(); + } +}); diff --git a/frontend/src/js/test/test-config.js b/frontend/src/js/test/test-config.js index 544db2741..372b8d2b9 100644 --- a/frontend/src/js/test/test-config.js +++ b/frontend/src/js/test/test-config.js @@ -1,4 +1,3 @@ -import * as CustomTestDurationPopup from "../popups/custom-test-duration-popup"; import Config, * as UpdateConfig from "../config"; import * as ManualRestart from "./manual-restart-tracker"; import * as TestLogic from "./test-logic"; @@ -172,9 +171,7 @@ $(document).on("click", "#top .config .wordCount .text-button", (e) => { $(document).on("click", "#top .config .time .text-button", (e) => { let mode = $(e.currentTarget).attr("timeConfig"); - if (mode == "custom") { - CustomTestDurationPopup.show(); - } else { + if (mode != "custom") { UpdateConfig.setTimeConfig(mode); ManualRestart.set(); TestLogic.restart();