diff --git a/public/css/style.scss b/public/css/style.scss index 18adc7c0f..21b2428a4 100644 --- a/public/css/style.scss +++ b/public/css/style.scss @@ -739,6 +739,10 @@ a:hover { #liveWpm { top: 6rem; + + &.lower { + top: 15rem; + } } #centerContent { diff --git a/public/js/script.js b/public/js/script.js index 0749e4214..1f5b5eef5 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -1062,41 +1062,43 @@ function flashPressedKeymapKey(key, correct) { key = `#Key${key.toUpperCase()}`; } - if (correct) { - $(key) - .stop(true, true) - .css({ - color: themeColors.bg, - backgroundColor: themeColors.main, - borderColor: themeColors.main, - }) - .animate( - { - color: themeColors.sub, - backgroundColor: themeColors.bg, - borderColor: themeColors.sub, - }, - 500, - "easeOutExpo" - ); - } else { - $(key) - .stop(true, true) - .css({ - color: themeColors.bg, - backgroundColor: themeColors.error, - borderColor: themeColors.error, - }) - .animate( - { - color: themeColors.sub, - backgroundColor: themeColors.bg, - borderColor: themeColors.sub, - }, - 500, - "easeOutExpo" - ); - } + try { + if (correct) { + $(key) + .stop(true, true) + .css({ + color: themeColors.bg, + backgroundColor: themeColors.main, + borderColor: themeColors.main, + }) + .animate( + { + color: themeColors.sub, + backgroundColor: themeColors.bg, + borderColor: themeColors.sub, + }, + 500, + "easeOutExpo" + ); + } else { + $(key) + .stop(true, true) + .css({ + color: themeColors.bg, + backgroundColor: themeColors.error, + borderColor: themeColors.error, + }) + .animate( + { + color: themeColors.sub, + backgroundColor: themeColors.bg, + borderColor: themeColors.sub, + }, + 500, + "easeOutExpo" + ); + } + } catch (e) {} } function updateHighlightedKeymapKey() { diff --git a/public/js/userconfig.js b/public/js/userconfig.js index 540888d4c..4c29960c4 100644 --- a/public/js/userconfig.js +++ b/public/js/userconfig.js @@ -740,9 +740,10 @@ function changeKeymapMode(mode, nosave) { mode = "off"; } if (mode === "off") { - hideKeymap(); + // hideKeymap(); + $("#liveWpm").removeClass("lower"); } else { - showKeymap(); + $("#liveWpm").addClass("lower"); } if (mode === "react") { $(".active-key").removeClass("active-key");