From 5c23412d751ea4298766abfaa6136d417345e983 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 24 Oct 2020 03:36:55 +0100 Subject: [PATCH] fixed memory --- public/js/script.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/js/script.js b/public/js/script.js index c17b282cb..7c1dbac81 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -307,6 +307,9 @@ function activateFunbox(funbox, mode) { $("#funBoxTheme").attr("href", ``); if (funbox === "none") { activeFunBox = "none"; + memoryFunboxInterval = clearInterval(memoryFunboxInterval); + memoryFunboxTimer = null; + $('#wordsWrapper').removeClass('hidden'); } if (mode === "style") { if (funbox != undefined) { @@ -2505,6 +2508,13 @@ function startTest() { array: [], }, }; + + if (activeFunBox === "memory") { + memoryFunboxInterval = clearInterval(memoryFunboxInterval); + memoryFunboxTimer = null; + $('#wordsWrapper').addClass('hidden'); + } + try { if (config.paceCaret !== "off") movePaceCaret(performance.now() + (paceCaret.spc * 1000)); } catch (e) {