mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 07:23:39 +08:00
added toggle always show words history to the command line
This commit is contained in:
parent
d8ab40b35f
commit
c68cc0bec5
2 changed files with 16 additions and 0 deletions
|
@ -210,6 +210,13 @@ let commands = {
|
|||
toggleBlindMode();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "toggleAlwaysShowWordsHistory",
|
||||
display: "Toggle always show words history",
|
||||
exec: () => {
|
||||
toggleAlwaysShowWordsHistory();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "toggleIndicateTypos",
|
||||
display: "Toggle indicate typos",
|
||||
|
|
|
@ -552,6 +552,15 @@ function setAlwaysShowWordsHistory(val, nosave) {
|
|||
if (!nosave) saveConfigToCookie();
|
||||
}
|
||||
|
||||
function toggleAlwaysShowWordsHistory() {
|
||||
let val = !config.alwaysShowWordsHistory;
|
||||
if (val == undefined) {
|
||||
val = false;
|
||||
}
|
||||
config.alwaysShowWordsHistory = val;
|
||||
saveConfigToCookie();
|
||||
}
|
||||
|
||||
//single list command line
|
||||
function setSingleListCommandLine(option, nosave) {
|
||||
if (!option) option = "manual";
|
||||
|
|
Loading…
Reference in a new issue