diff --git a/public/index.html b/public/index.html index b7536cac5..856e207e4 100644 --- a/public/index.html +++ b/public/index.html @@ -7,7 +7,7 @@ Monkey Type - + @@ -889,9 +889,9 @@

timer opacity

Change the opacity of the timer number/bar and live wpm number.
-
.25
-
.5
-
.75
+
0.25
+
0.5
+
0.75
1
diff --git a/public/js/script.js b/public/js/script.js index 005f83a80..13442cf76 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -163,8 +163,8 @@ function getReleasesFromGitHub() {
${release.name}
${moment(release.published_at).format( - "DD MMM YYYY" - )}
+ "DD MMM YYYY" + )}
${release.body.replace(/\r\n/g, "
")}
`); @@ -667,9 +667,12 @@ function changeTimerColor(color) { } function changeTimerOpacity(opacity) { - if(opacity){ - $("#timerNumber").css("opacity", opacity); + if (opacity) { $("#liveWpm").css("opacity", opacity); + if (config.timerStyle == "text") { + $("#timerNumber").css("opacity", opacity); + return + } } } @@ -899,12 +902,12 @@ function calculateStats() { chars.incorrectChars + chars.extraChars) * (60 / testSeconds)) / - 5 + 5 ); let acc = roundTo2( (accuracyStats.correct / (accuracyStats.correct + accuracyStats.incorrect)) * - 100 + 100 ); return { wpm: isNaN(wpm) ? 0 : wpm, @@ -1060,7 +1063,7 @@ function showResult(difficultyFailed = false) { activeTags.push(tag.id); } }); - } catch (e) {} + } catch (e) { } let completedEvent = { wpm: stats.wpm, @@ -1380,7 +1383,7 @@ function showResult(difficultyFailed = false) { tagsText += "
" + tag.name; } }); - } catch (e) {} + } catch (e) { } if (tagsText == "") { $("#result .stats .tags").addClass("hidden"); @@ -1725,15 +1728,8 @@ function updateLiveWpm(wpm) { function showLiveWpm() { if (!config.showLiveWpm) return; if (!testActive) return; - let op = 0.25; - if ( - $("#liveWpm").hasClass("timerSub") || - $("#liveWpm").hasClass("timerText") || - $("#liveWpm").hasClass("timerMain") - ) { - op = 1; - } - $("#liveWpm").css("opacity", op); + $("#liveWpm").css("opacity", config.timerOpacity); + $("#timerNumber").css("opacity", config.timerOpacity); } function hideLiveWpm() { @@ -2004,7 +2000,7 @@ function updateTestModesNotice() { )}` ); } - } catch (e) {} + } catch (e) { } if (anim) { $(".pageTest #testModesNotice") diff --git a/public/js/settings.js b/public/js/settings.js index c15865a85..ae2ad8d39 100644 --- a/public/js/settings.js +++ b/public/js/settings.js @@ -194,9 +194,9 @@ function setActiveTimerColorButton() { function setActiveTimerOpacityButton() { $(`.pageSettings .section.timerOpacity .buttons .button`).removeClass("active"); $( - `.pageSettings .section.timerOpacity .buttons .button[opacity=` + + `.pageSettings .section.timerOpacity .buttons .button[opacity="` + config.timerOpacity + - `]` + `"]` ).addClass("active"); } diff --git a/public/js/userconfig.js b/public/js/userconfig.js index 9b473abab..19ea82af3 100644 --- a/public/js/userconfig.js +++ b/public/js/userconfig.js @@ -37,7 +37,7 @@ let defaultConfig = { colorfulMode: true, randomTheme: false, timerColor: "black", - timerOpacity: .25, + timerOpacity: "0.25", }; let cookieConfig = null; @@ -320,8 +320,8 @@ function setTimerOpacity(opacity, nosave) { if (opacity == null || opacity == undefined) { opacity = .25; } - config.timerOpacity = opacity; changeTimerOpacity(opacity); + config.timerOpacity = opacity; if (!nosave) saveConfigToCookie(); } diff --git a/public/themes/aether.css b/public/themes/aether.css index 4b3fb5dfa..66bf6dfdd 100644 --- a/public/themes/aether.css +++ b/public/themes/aether.css @@ -1,30 +1,32 @@ :root { - --bg-color: #101820; - --main-color: #eedaea; - --caret-color: #eedaea; - --sub-color: #cf6bdd; - --text-color: #eedaea; - --error-color: #ff5253; - --error-extra-color: #e3002b; - --colorful-error-color: #ff5253; - --colorful-error-extra-color: #e3002b; + --bg-color: #101820; + --main-color: #eedaea; + --caret-color: #eedaea; + --sub-color: #cf6bdd; + --text-color: #eedaea; + --error-color: #ff5253; + --error-extra-color: #e3002b; + --colorful-error-color: #ff5253; + --colorful-error-extra-color: #e3002b; +} + +#menu .icon-button:nth-child(1) { + color: #e4002b; +} + +#menu .icon-button:nth-child(2) { + color: #c53562; +} + +#menu .icon-button:nth-child(3) { + color: #95549e; +} + +#menu .icon-button:nth-child(4) { + color: #6744a1; +} + +#menu .icon-button:nth-child(5), +#menu .icon-button:nth-child(6) { + color: #393c73; } - #menu .icon-button:nth-child(1){ - color: #e4002b; - } - - #menu .icon-button:nth-child(2){ - color: #c53562; - } - - #menu .icon-button:nth-child(3){ - color: #95549e; - } - - #menu .icon-button:nth-child(4){ - color: #6744a1; - } - - #menu .icon-button:nth-child(5), #menu .icon-button:nth-child(6){ - color: #393c73; - } \ No newline at end of file diff --git a/public/themes/froyo.css b/public/themes/froyo.css index 0c4edfe95..1f6d11141 100644 --- a/public/themes/froyo.css +++ b/public/themes/froyo.css @@ -1,30 +1,32 @@ :root { - --bg-color: #e1dacb; - --main-color: #7b7d7d; - --caret-color: #7b7d7d; - --sub-color: #b29c5e; - --text-color: #7b7d7d; - --error-color: #f28578; - --error-extra-color: #d56558; - --colorful-error-color: #f28578; - --colorful-error-extra-color: #d56558; + --bg-color: #e1dacb; + --main-color: #7b7d7d; + --caret-color: #7b7d7d; + --sub-color: #b29c5e; + --text-color: #7b7d7d; + --error-color: #f28578; + --error-extra-color: #d56558; + --colorful-error-color: #f28578; + --colorful-error-extra-color: #d56558; +} + +#menu .icon-button:nth-child(1) { + color: #ff7e73; +} + +#menu .icon-button:nth-child(2) { + color: #f5c370; +} + +#menu .icon-button:nth-child(3) { + color: #08d9a3; +} + +#menu .icon-button:nth-child(4) { + color: #0ca5e2; +} + +#menu .icon-button:nth-child(5), +#menu .icon-button:nth-child(6) { + color: #875ac6; } - #menu .icon-button:nth-child(1){ - color: #ff7e73; - } - - #menu .icon-button:nth-child(2){ - color: #f5c370; - } - - #menu .icon-button:nth-child(3){ - color: #08d9a3; - } - - #menu .icon-button:nth-child(4){ - color: #0ca5e2; - } - - #menu .icon-button:nth-child(5), #menu .icon-button:nth-child(6){ - color: #875ac6; - } \ No newline at end of file diff --git a/public/themes/future_funk.css b/public/themes/future_funk.css index 4cf3159c5..b88aa1a77 100644 --- a/public/themes/future_funk.css +++ b/public/themes/future_funk.css @@ -1,32 +1,33 @@ :root { - --bg-color: #2E1A47; - --main-color: #f7f2ea; - --caret-color: #f7f2ea; - --sub-color: #c18fff; - --text-color: #f7f2ea; - --error-color: #F8BED6; - --error-extra-color: #F04E98; - --colorful-error-color: #F8BED6; - --colorful-error-extra-color: #F04E98; - } - - - #menu .icon-button:nth-child(1){ - color: #F04E98; - } - - #menu .icon-button:nth-child(2){ - color: #F8BED6; - } - - #menu .icon-button:nth-child(3){ - color: #F6EB61; - } - - #menu .icon-button:nth-child(4){ - color: #A4DBE8; - } - - #menu .icon-button:nth-child(5), #menu .icon-button:nth-child(6){ - color: #a266ed; - } \ No newline at end of file + --bg-color: #2E1A47; + --main-color: #f7f2ea; + --caret-color: #f7f2ea; + --sub-color: #c18fff; + --text-color: #f7f2ea; + --error-color: #F8BED6; + --error-extra-color: #F04E98; + --colorful-error-color: #F8BED6; + --colorful-error-extra-color: #F04E98; +} + + +#menu .icon-button:nth-child(1) { + color: #F04E98; +} + +#menu .icon-button:nth-child(2) { + color: #F8BED6; +} + +#menu .icon-button:nth-child(3) { + color: #F6EB61; +} + +#menu .icon-button:nth-child(4) { + color: #A4DBE8; +} + +#menu .icon-button:nth-child(5), +#menu .icon-button:nth-child(6) { + color: #a266ed; +} diff --git a/public/themes/list.json b/public/themes/list.json index 8de9111f8..25895bd1f 100644 --- a/public/themes/list.json +++ b/public/themes/list.json @@ -254,7 +254,7 @@ "textColor": "#4fcdb9" }, { - "name": "future funk", + "name": "future_funk", "bgColor": "#2E1A47", "textColor": "f7f2ea" }, @@ -278,4 +278,4 @@ "bgColor": "#07737a", "textColor": "#88dbdf" } -] \ No newline at end of file +] diff --git a/public/themes/milkshake.css b/public/themes/milkshake.css index 769313168..e50421c83 100644 --- a/public/themes/milkshake.css +++ b/public/themes/milkshake.css @@ -1,37 +1,36 @@ :root { - --bg-color: #ffffff; - --main-color: #212b43; - --caret-color: #212b43; - --sub-color: #62cfe6; - --text-color: #212b43; - --error-color: #f19dac; - --error-extra-color: #e58c9d; - --colorful-error-color: #f19dac; - --colorful-error-extra-color: #e58c9d; - } - - - #menu .icon-button:nth-child(1){ - color: #f19dac; - } - - #menu .icon-button:nth-child(2){ - color: #f6f4a0; - } - - #menu .icon-button:nth-child(3){ - color: #73e4d0; - } - - #menu .icon-button:nth-child(4){ - color: #61cfe6; - } - - #menu .icon-button:nth-child(5){ - color: #ba96db; - } - - #menu .icon-button:nth-child(6){ - color: #ba96db; - } - \ No newline at end of file + --bg-color: #ffffff; + --main-color: #212b43; + --caret-color: #212b43; + --sub-color: #62cfe6; + --text-color: #212b43; + --error-color: #f19dac; + --error-extra-color: #e58c9d; + --colorful-error-color: #f19dac; + --colorful-error-extra-color: #e58c9d; +} + + +#menu .icon-button:nth-child(1) { + color: #f19dac; +} + +#menu .icon-button:nth-child(2) { + color: #f6f4a0; +} + +#menu .icon-button:nth-child(3) { + color: #73e4d0; +} + +#menu .icon-button:nth-child(4) { + color: #61cfe6; +} + +#menu .icon-button:nth-child(5) { + color: #ba96db; +} + +#menu .icon-button:nth-child(6) { + color: #ba96db; +} diff --git a/public/themes/retrocast.css b/public/themes/retrocast.css index eeb0edf9a..220e5d851 100644 --- a/public/themes/retrocast.css +++ b/public/themes/retrocast.css @@ -9,22 +9,24 @@ --colorful-error-color: #ff585d; --colorful-error-extra-color: #c04455; } - #menu .icon-button:nth-child(1){ - color: #88dbdf; - } - #menu .icon-button:nth-child(2){ +#menu .icon-button:nth-child(1) { color: #88dbdf; - } +} - #menu .icon-button:nth-child(3){ +#menu .icon-button:nth-child(2) { color: #88dbdf; - } +} - #menu .icon-button:nth-child(4){ +#menu .icon-button:nth-child(3) { + color: #88dbdf; +} + +#menu .icon-button:nth-child(4) { color: #ff585d; - } +} - #menu .icon-button:nth-child(5), #menu .icon-button:nth-child(6){ +#menu .icon-button:nth-child(5), +#menu .icon-button:nth-child(6) { color: #f3e03b; - } \ No newline at end of file +}