mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-01 01:05:06 +08:00
refactor: using usual function syntax
Im not exactly sure what was the point in reassigning the show function
This commit is contained in:
parent
174525c6be
commit
a752a1a8cd
1 changed files with 2 additions and 7 deletions
|
@ -223,7 +223,7 @@ function updateSuggested(): void {
|
|||
updateActiveEntry();
|
||||
}
|
||||
|
||||
let show = (): void => {
|
||||
function show(): void {
|
||||
themeChosen = false;
|
||||
activeIndex = 0;
|
||||
commandLineMouseMode = false;
|
||||
|
@ -254,7 +254,7 @@ let show = (): void => {
|
|||
$("#commandLine input").val("");
|
||||
updateSuggested();
|
||||
$("#commandLine input").trigger("focus");
|
||||
};
|
||||
}
|
||||
|
||||
function hide(shouldFocusTestUI = true): void {
|
||||
UpdateConfig.previewFontFamily(Config.fontFamily);
|
||||
|
@ -413,14 +413,9 @@ function generateSingleListOfCommands(): {
|
|||
list: MonkeyTypes.Command[];
|
||||
} {
|
||||
const allCommands: MonkeyTypes.Command[] = [];
|
||||
const oldShowCommandLine = show;
|
||||
show = (): void => {
|
||||
//
|
||||
};
|
||||
CommandlineLists.commands.list.forEach((c) =>
|
||||
addChildCommands(allCommands, c)
|
||||
);
|
||||
show = oldShowCommandLine;
|
||||
return {
|
||||
title: "All Commands",
|
||||
list: allCommands,
|
||||
|
|
Loading…
Reference in a new issue