mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-27 10:31:22 +08:00
removed dependencies
This commit is contained in:
parent
a5e842fe91
commit
7b599a2465
5 changed files with 18 additions and 21 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import * as Config from "../config";
|
||||
import * as DB from "../db";
|
||||
import * as Notifications from "../elements/notifications";
|
||||
import * as Settings from "../pages/settings";
|
||||
import * as TestLogic from "../test/test-logic";
|
||||
import * as TagController from "./tag-controller";
|
||||
|
||||
|
|
@ -19,7 +18,6 @@ export function apply(_id) {
|
|||
TestLogic.restart();
|
||||
Notifications.add("Preset applied", 1, 2);
|
||||
Config.saveToLocalStorage();
|
||||
Settings.update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ export function updatePresetCommands() {
|
|||
display: dis,
|
||||
exec: () => {
|
||||
PresetController.apply(preset._id);
|
||||
Settings.update();
|
||||
TestUI.updateModesNotice();
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -634,3 +634,19 @@ $(document).on("click", ".keymap .r5 #KeySpace", (e) => {
|
|||
CommandlineLists.setCurrent([CommandlineLists.commandsKeymapLayouts]);
|
||||
show();
|
||||
});
|
||||
|
||||
$(document).on("click", "#testModesNotice .text-button", (event) => {
|
||||
let commands = CommandlineLists.getList(
|
||||
$(event.currentTarget).attr("commands")
|
||||
);
|
||||
let func = $(event.currentTarget).attr("function");
|
||||
if (commands !== undefined) {
|
||||
if ($(event.currentTarget).attr("commands") === "commandsTags") {
|
||||
CommandlineLists.updateTagCommands();
|
||||
}
|
||||
CommandlineLists.pushCurrent(commands);
|
||||
show();
|
||||
} else if (func != undefined) {
|
||||
eval(func);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -808,6 +808,7 @@ $(document).on(
|
|||
let presetid = $(target).parent(".preset").attr("id");
|
||||
console.log("Applying Preset");
|
||||
PresetController.apply(presetid);
|
||||
update();
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ import * as PaceCaret from "./pace-caret";
|
|||
import * as CustomText from "./custom-text";
|
||||
import * as Keymap from "../elements/keymap";
|
||||
import * as Caret from "./caret";
|
||||
import * as CommandlineLists from "../elements/commandline-lists";
|
||||
import * as Commandline from "../elements/commandline";
|
||||
import * as OutOfFocus from "./out-of-focus";
|
||||
import * as ManualRestart from "./manual-restart-tracker";
|
||||
import * as PractiseWords from "./practise-words";
|
||||
|
|
@ -1080,23 +1078,6 @@ $(document).on("mouseenter", "#resultWordsHistory .words .word", (e) => {
|
|||
}
|
||||
});
|
||||
|
||||
$(document).on("click", "#testModesNotice .text-button", (event) => {
|
||||
// console.log("CommandlineLists."+$(event.currentTarget).attr("commands"));
|
||||
let commands = CommandlineLists.getList(
|
||||
$(event.currentTarget).attr("commands")
|
||||
);
|
||||
let func = $(event.currentTarget).attr("function");
|
||||
if (commands !== undefined) {
|
||||
if ($(event.currentTarget).attr("commands") === "commandsTags") {
|
||||
CommandlineLists.updateTagCommands();
|
||||
}
|
||||
CommandlineLists.pushCurrent(commands);
|
||||
Commandline.show();
|
||||
} else if (func != undefined) {
|
||||
eval(func);
|
||||
}
|
||||
});
|
||||
|
||||
$("#wordsInput").on("focus", () => {
|
||||
if (!resultVisible && Config.showOutOfFocusWarning) {
|
||||
OutOfFocus.hide();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue