mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 00:06:16 +08:00
Revert
This commit is contained in:
parent
a78ecdd6f5
commit
4cd30f0e10
|
@ -671,26 +671,6 @@ let commandsMinAcc = {
|
|||
],
|
||||
};
|
||||
|
||||
let commandsMinAccGrace = {
|
||||
title: "Change min accuracy grace option...",
|
||||
list: [
|
||||
{
|
||||
id: "setMinAccGraceOff",
|
||||
display: "off",
|
||||
exec: () => {
|
||||
UpdateConfig.setMinAccGrace("off");
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "setMinAccGraceOn",
|
||||
display: "on",
|
||||
exec: () => {
|
||||
UpdateConfig.setMinAccGrace("on");
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
let commandsKeymapStyle = {
|
||||
title: "Change keymap style...",
|
||||
list: [
|
||||
|
@ -1552,16 +1532,6 @@ export let defaultCommands = {
|
|||
Commandline.show();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "changeMinAccGrace",
|
||||
display: "Change min accuracy grace option...",
|
||||
alias: "mingrace",
|
||||
subgroup: true,
|
||||
exec: () => {
|
||||
current.push(commandsMinAccGrace);
|
||||
Commandline.show();
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "changeOppositeShiftMode",
|
||||
display: "Change opposite shift mode...",
|
||||
|
|
|
@ -112,7 +112,6 @@ let defaultConfig = {
|
|||
strictSpace: false,
|
||||
minAcc: "off",
|
||||
minAccCustom: 90,
|
||||
minAccGrace: "off",
|
||||
showLiveAcc: false,
|
||||
monkey: false,
|
||||
repeatQuotes: "off",
|
||||
|
@ -562,14 +561,6 @@ export function setMinAccCustom(val, nosave) {
|
|||
if (!nosave) saveToLocalStorage();
|
||||
}
|
||||
|
||||
export function setMinAccGrace(val, nosave) {
|
||||
if (val !== "on") {
|
||||
val = "off";
|
||||
}
|
||||
config.minAccGrace = val;
|
||||
if (!nosave) saveToLocalStorage();
|
||||
}
|
||||
|
||||
//always show words history
|
||||
export function setAlwaysShowWordsHistory(val, nosave) {
|
||||
if (val == undefined) {
|
||||
|
@ -1556,7 +1547,6 @@ export function apply(configObj) {
|
|||
setMinWpmCustomSpeed(configObj.minWpmCustomSpeed, true);
|
||||
setMinAcc(configObj.minAcc, true);
|
||||
setMinAccCustom(configObj.minAccCustom, true);
|
||||
setMinAccGrace(configObj.minAccGrace, true);
|
||||
setNumbers(configObj.numbers, true);
|
||||
setPunctuation(configObj.punctuation, true);
|
||||
setHighlightMode(configObj.highlightMode, true);
|
||||
|
|
|
@ -217,7 +217,6 @@ async function initGroups() {
|
|||
$(".pageSettings .section.minAcc input.customMinAcc").addClass("hidden");
|
||||
}
|
||||
});
|
||||
groups.minAcc = new SettingsGroup("minAccGrace", UpdateConfig.setMinAccGrace);
|
||||
groups.smoothLineScroll = new SettingsGroup(
|
||||
"smoothLineScroll",
|
||||
UpdateConfig.setSmoothLineScroll
|
||||
|
|
|
@ -167,14 +167,6 @@ export function setLastSecondNotRound() {
|
|||
export function calculateAccuracy() {
|
||||
return (accuracy.correct / (accuracy.correct + accuracy.incorrect)) * 100;
|
||||
}
|
||||
export function calculateAccuracyWithGrace() {
|
||||
const graceCharacters = Config.minAccCustom / 2.5;
|
||||
const grace =
|
||||
Math.min(accuracy.correct + accuracy.incorrect, graceCharacters) /
|
||||
graceCharacters;
|
||||
const incorrect = accuracy.incorrect * grace;
|
||||
return (accuracy.correct / (accuracy.correct + incorrect)) * 100;
|
||||
}
|
||||
|
||||
export function incrementAccuracy(correctincorrect) {
|
||||
if (correctincorrect) {
|
||||
|
|
|
@ -38,11 +38,7 @@ export function start() {
|
|||
TestStats.pushToRawHistory(wpmAndRaw.raw);
|
||||
Monkey.updateFastOpacity(wpmAndRaw.wpm);
|
||||
|
||||
let acc = Misc.roundTo2(
|
||||
Config.minAccGrace === "on"
|
||||
? TestStats.calculateAccuracyWithGrace()
|
||||
: TestStats.calculateAccuracy()
|
||||
);
|
||||
let acc = Misc.roundTo2(TestStats.calculateAccuracy());
|
||||
|
||||
if (Funbox.active === "layoutfluid" && Config.mode === "time") {
|
||||
const layouts = Config.customLayoutfluid
|
||||
|
|
|
@ -2248,31 +2248,6 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section minAccGrace" section="">
|
||||
<h1>min accuracy grace</h1>
|
||||
<div class="text">
|
||||
When min accuracy is on, turning this setting on as well will
|
||||
forgive a few errors at the beginning of each test.
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<div
|
||||
class="button"
|
||||
minAccGrace="off"
|
||||
tabindex="0"
|
||||
onclick="this.blur();"
|
||||
>
|
||||
off
|
||||
</div>
|
||||
<div
|
||||
class="button"
|
||||
minAccGrace="on"
|
||||
tabindex="0"
|
||||
onclick="this.blur();"
|
||||
>
|
||||
on
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section languageGroups fullWidth">
|
||||
<h1>language groups</h1>
|
||||
<div class="buttons"></div>
|
||||
|
|
Loading…
Reference in a new issue