mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-06 05:26:54 +08:00
removed dependency by moving code
This commit is contained in:
parent
7b599a2465
commit
1f82d9dff1
2 changed files with 8 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue