Merge branch 'master' into lint

This commit is contained in:
typer 2020-11-03 19:01:08 -08:00
commit c4b1407770
183 changed files with 50 additions and 13 deletions

View file

@ -110,7 +110,7 @@ task("sass", function () {
});
task("static", function () {
return src("./public/**/*").pipe(dest("./dist/"));
return src("./static/**/*").pipe(dest("./dist/"));
});
task("clean", function () {
@ -120,7 +120,7 @@ task("clean", function () {
task("compile", series("static", "sass", "cat"));
task("watch", function () {
watch(["./public/**/*", "./src/**/*"], series("compile"));
watch(["./static/**/*", "./src/**/*"], series("compile"));
});
task("build", series("clean", "compile"));

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "monkeytype",
"version": "1.5.3",
"version": "1.5.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,13 +1,15 @@
{
"name": "monkeytype",
"version": "1.5.3",
"version": "1.5.6",
"license": "GPL-3.0",
"private": true,
"scripts": {
"postinstall": "cd functions && npm install",
"build": "npx gulp build",
"start": "npm run build && firebase serve",
"start:dev": "npm run build && concurrently --kill-others \"npx gulp watch\" \"firebase serve\"",
"postinstall": "cd functions && npm install"
"start": "npm run build && concurrently --kill-others \"npx gulp watch\" \"firebase serve\"",
"deploy:live:hosting": "npm run build && firebase deploy -P live --only hosting",
"deploy:live:functions": "npm run build && firebase deploy -P live --only functions",
"deploy:live": "npm run build && firebase deploy -P live"
},
"engines": {
"node": "10"

View file

@ -305,6 +305,15 @@ let commands = {
toggleShowOutOfFocusWarning();
},
},
{
id: "setEnableAds",
display: "Set enable ads...",
subgroup: true,
exec: () => {
currentCommands.push(commandsEnableAds);
showCommandLine();
},
},
{
id: "togglePresetCustomTheme",
display: "Toggle preset/custom theme",
@ -754,6 +763,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: [

View file

@ -1773,7 +1773,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(
@ -1795,7 +1794,7 @@ function showResult(difficultyFailed = false) {
$("#result .stats .wpm .top .text").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));

View file

@ -641,10 +641,7 @@ function setEnableAds(val, nosave) {
val = "off";
}
config.enableAds = val;
if (!nosave)
saveConfigToCookie().then(() => {
setTimeout(location.reload(), 500);
});
if (!nosave) saveConfigToCookie();
}
//flip colors

View file

Before

Width:  |  Height:  |  Size: 567 B

After

Width:  |  Height:  |  Size: 567 B

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Some files were not shown because too many files have changed in this diff Show more