mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 15:56:24 +08:00
Added config entries and setter function
This commit is contained in:
parent
36af4de510
commit
08cd376fa2
|
@ -53,6 +53,7 @@ let defaultConfig = {
|
|||
smoothLineScroll: false,
|
||||
alwaysShowDecimalPlaces: false,
|
||||
alwaysShowWordsHistory: false,
|
||||
singleListCommandLine: "manual",
|
||||
playSoundOnError: false,
|
||||
playSoundOnClick: "off",
|
||||
startGraphsAtZero: true,
|
||||
|
@ -190,6 +191,7 @@ function applyConfig(configObj) {
|
|||
setShowTimerProgress(configObj.showTimerProgress, true);
|
||||
setAlwaysShowDecimalPlaces(configObj.alwaysShowDecimalPlaces, true);
|
||||
setAlwaysShowWordsHistory(configObj.alwaysShowWordsHistory, true);
|
||||
setSingleListCommandLine(configObj.singleListCommandLine, true);
|
||||
setPlaySoundOnError(configObj.playSoundOnError, true);
|
||||
setPlaySoundOnClick(configObj.playSoundOnClick, true);
|
||||
setStopOnError(configObj.stopOnError, true);
|
||||
|
@ -429,6 +431,13 @@ function setAlwaysShowWordsHistory(val, nosave) {
|
|||
if (!nosave) saveConfigToCookie();
|
||||
}
|
||||
|
||||
//single list command line
|
||||
function setSingleListCommandLine(option, nosave) {
|
||||
if (!option) option = "manual";
|
||||
config.singleListCommandLine = option;
|
||||
if (!nosave) saveConfigToCookie();
|
||||
}
|
||||
|
||||
//show all lines
|
||||
function toggleShowAllLines() {
|
||||
sal = !config.showAllLines;
|
||||
|
|
Loading…
Reference in a new issue