diff --git a/frontend/src/js/pages/test.js b/frontend/src/js/pages/test.js index b893f2ee3..b34e54ce3 100644 --- a/frontend/src/js/pages/test.js +++ b/frontend/src/js/pages/test.js @@ -13,7 +13,7 @@ export const page = new Page( "/", async () => { TestLogic.restart(); - Funbox.activate("none"); + Funbox.clear(); TestConfig.hide(); $("#wordsInput").focusout(); }, diff --git a/frontend/src/js/test/funbox.js b/frontend/src/js/test/funbox.js index 1fa0c1e29..95682294f 100644 --- a/frontend/src/js/test/funbox.js +++ b/frontend/src/js/test/funbox.js @@ -92,6 +92,17 @@ export function setFunbox(funbox, mode) { return true; } +export async function clear() { + $("#funBoxTheme").attr("href", ``); + $("#words").removeClass("nospace"); + $("#words").removeClass("arrows"); + reset(); + $("#wordsWrapper").removeClass("hidden"); + ManualRestart.set(); + ModesNotice.update(); + return true; +} + export async function activate(funbox) { let mode = modeSaved; diff --git a/frontend/src/js/test/test-logic.js b/frontend/src/js/test/test-logic.js index 79ac3aadd..64b1954a0 100644 --- a/frontend/src/js/test/test-logic.js +++ b/frontend/src/js/test/test-logic.js @@ -456,7 +456,7 @@ export function restart( "Sorry, this funbox won't work with repeated tests.", 0 ); - await Funbox.activate("none"); + await Funbox.clear(); } else { await Funbox.activate(); }