mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-13 07:23:39 +08:00
changed the way custom speed is set for the pace caret
This commit is contained in:
parent
7180b041e5
commit
8c92983ae5
3 changed files with 5 additions and 4 deletions
|
@ -2574,6 +2574,7 @@ function restartTest(withSameWordset = false, nosave = false) {
|
|||
hideLiveWpm();
|
||||
hideTimer();
|
||||
bailout = false;
|
||||
paceCaret = null;
|
||||
if(paceCaret !== null) clearTimeout(paceCaret.timeout);
|
||||
$("#showWordHistoryButton").removeClass("loaded");
|
||||
keypressPerSecond = [];
|
||||
|
@ -2632,7 +2633,6 @@ function restartTest(withSameWordset = false, nosave = false) {
|
|||
$("#typingTest").css("opacity", 0).removeClass("hidden");
|
||||
if (!withSameWordset) {
|
||||
sameWordset = false;
|
||||
paceCaret = null;
|
||||
initWords();
|
||||
initPaceCaret(nosave);
|
||||
} else {
|
||||
|
@ -3596,8 +3596,6 @@ function playErrorSound() {
|
|||
|
||||
async function initPaceCaret(nosave = false) {
|
||||
|
||||
setPaceCaretCustomSpeed(parseInt($(".pageSettings .section.paceCaret input.customPaceCaretSpeed").val()),nosave);
|
||||
|
||||
let mode2 = "";
|
||||
if (config.mode === "time") {
|
||||
mode2 = config.time;
|
||||
|
|
|
@ -656,6 +656,10 @@ function updateDiscordSettingsSection() {
|
|||
}
|
||||
}
|
||||
|
||||
$(document).on('focusout', ".pageSettings .section.paceCaret input.customPaceCaretSpeed", (e) => {
|
||||
setPaceCaretCustomSpeed(parseInt($(".pageSettings .section.paceCaret input.customPaceCaretSpeed").val()));
|
||||
})
|
||||
|
||||
$(document).on("click", ".pageSettings .section.themes .theme.button", (e) => {
|
||||
let theme = $(e.currentTarget).attr("theme");
|
||||
if (!$(e.target).hasClass("favButton")) {
|
||||
|
|
|
@ -416,7 +416,6 @@ function setPaceCaretCustomSpeed(val, nosave) {
|
|||
val = 100;
|
||||
}
|
||||
config.paceCaretCustomSpeed = val;
|
||||
$(".pageSettings .section.paceCaret input.customPaceCaretSpeed").val(val);
|
||||
if (!nosave) saveConfigToCookie();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue