From f1993fc8a1a91e95f6668f7a74cdac03ea5b1591 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 30 Oct 2020 16:18:42 +0000 Subject: [PATCH 1/2] smaller keymap name --- public/css/style.scss | 1 + public/js/script.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/css/style.scss b/public/css/style.scss index a594acfa5..4218ee2e8 100644 --- a/public/css/style.scss +++ b/public/css/style.scss @@ -3058,6 +3058,7 @@ key { .r5 { display: grid; grid-template-columns: 3.5fr 6fr 3.5fr; + font-size: 0.5rem; // &.matrixSpace { // // grid-template-columns: 6.75fr 1.9fr 6.75fr; // grid-template-columns: 6.9fr 4.6fr 6.9fr; // wider spacebar diff --git a/public/js/script.js b/public/js/script.js index f1efd1288..79ea247e2 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -1764,7 +1764,6 @@ function showResult(difficultyFailed = false) { time = secondsToString(roundTo2(testtime)); } $("#result .stats .time .bottom .text").text(time); - $("#result .stats .raw .bottom").removeAttr("aria-label"); $("#result .stats .acc .bottom").removeAttr("aria-label"); $("#result .stats .time .bottom").attr( @@ -1786,7 +1785,7 @@ function showResult(difficultyFailed = false) { $("#result .stats .wpm .top").text("cpm"); $("#result .stats .wpm .bottom").attr( "aria-label", - stats.wpm + ` (${roundTo2(stats.wpm)} wpm)` + stats.wpm * 5 + ` (${roundTo2(stats.wpm)} wpm)` ); $("#result .stats .wpm .bottom").text(Math.round(stats.wpm * 5)); $("#result .stats .raw .bottom").text(Math.round(stats.wpmRaw * 5)); From d8f9a40edd34c66b19d78dade3bb4281b1e056d4 Mon Sep 17 00:00:00 2001 From: Corey Bergeron Date: Tue, 3 Nov 2020 20:29:47 -0500 Subject: [PATCH 2/2] added enable ads to command line --- package-lock.json | 2 +- src/js/commandline.js | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index cf207e660..d8da575d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "monkeytype", - "version": "1.5.3", + "version": "1.5.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/js/commandline.js b/src/js/commandline.js index 902360d9d..5501af046 100644 --- a/src/js/commandline.js +++ b/src/js/commandline.js @@ -309,6 +309,15 @@ let commands = { toggleShowOutOfFocusWarning(); }, }, + { + id: "setEnableAds", + display: "Set enable ads...", + subgroup: true, + exec: () => { + currentCommands.push(commandsEnableAds); + showCommandLine(); + }, + }, { id: "togglePresetCustomTheme", display: "Toggle preset/custom theme", @@ -758,6 +767,36 @@ let commandsDifficulty = { ], }; +let commandsEnableAds = { + title: "Set enable ads...", + list: [ + { + id: "setEnableAdsOff", + display: "off", + exec: () => { + setEnableAds("off"); + showNotification("Don't forget to refresh the page!", 3000); + }, + }, + { + id: "setEnableAdsOn", + display: "on", + exec: () => { + setEnableAds("on"); + showNotification("Don't forget to refresh the page!", 3000); + }, + }, + { + id: "setEnableMax", + display: "Sellout", + exec: () => { + setEnableAds("max"); + showNotification("Don't forget to refresh the page!", 3000); + }, + }, + ], +}; + let commandsCaretStyle = { title: "Change caret style...", list: [