diff --git a/src/js/account.js b/src/js/account.js index 76766b3a9..50c3540f4 100644 --- a/src/js/account.js +++ b/src/js/account.js @@ -308,6 +308,7 @@ firebase.auth().onAuthStateChanged(function (user) { setCustomThemeInputs(); } if (/challenge_.+/g.test(window.location.pathname)) { + Notifications.add("Loading challenge", 0); let challengeName = window.location.pathname.split("_")[1]; setTimeout(() => { setupChallenge(challengeName); diff --git a/src/js/script.js b/src/js/script.js index 54d6c7f81..0854eaab4 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -1353,7 +1353,7 @@ function showResult(difficultyFailed = false) { } if (difficultyFailed) { - Notifications.add("Test failed", 0); + Notifications.add("Test failed", 0, 1); } else if (afkDetected) { Notifications.add("Test invalid - AFK detected", 0); } else if (sameWordset) { @@ -4517,7 +4517,14 @@ async function setupChallenge(challengeName) { let notitext; try { if (challenge === undefined) { - throw "Challenge not found"; + Notifications.add("Challenge not found", 0); + ManualRestart.set(); + restartTest(false, true); + setTimeout(() => { + $("#top .config").removeClass("hidden"); + $(".page.pageTest").removeClass("hidden"); + }, 250); + return; } if (challenge.type === "customTime") { setTimeConfig(challenge.parameters[0], true); diff --git a/static/challenges/_list.json b/static/challenges/_list.json index 5239d66c4..9706f17d9 100644 --- a/static/challenges/_list.json +++ b/static/challenges/_list.json @@ -31,27 +31,27 @@ } ,{ "name": "trueSimp", - "type": "CustomText", + "type": "customText", "parameters": ["miodec",true,10000] } ,{ "name": "simp", - "type": "CustomText", + "type": "customText", "parameters": ["miodec",true,1000] } ,{ "name": "antidiseWhat", - "type": "CustomText", + "type": "customText", "parameters": ["antidisestablishmentarianism",true,1] } ,{ "name": "whatsThisWebsiteCalledAgain", - "type": "CustomText", + "type": "customText", "parameters": ["monkeytype",true,1000] } ,{ "name": "developd", - "type": "CustomText", + "type": "customText", "parameters": ["develop",true,1000] } ,{ @@ -61,12 +61,12 @@ } ,{ "name": "speedSpacer", - "type": "CustomText", + "type": "customText", "parameters": ["a b c d e f g h i j k l m n o p q r s t u v w x y z",true,100] } ,{ "name": "iveGotThePower", - "type": "CustomText", + "type": "customText", "parameters": ["power",true,10] } ,{