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: [