From 01a09a4a4862bfbfc8008553e6b04594741a5df3 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 11 Aug 2020 14:55:21 +0100 Subject: [PATCH 1/2] fixed a bug where theme would be randomised when custom is enabled --- public/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/script.js b/public/js/script.js index cbd35e20c..34b73d247 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -2065,7 +2065,7 @@ function restartTest(withSameWordset = false) { el = $("#wordsWrapper"); } if (resultVisible) { - if (config.randomTheme && !pageTransition) { + if (config.randomTheme && !pageTransition && !config.customTheme) { randomiseTheme(); showNotification(config.theme.replace(/_/g, " "), 1500); } From c3841209380e296f22f7f062d69abb790cc45391 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 11 Aug 2020 14:57:00 +0100 Subject: [PATCH 2/2] fixed a bug where funbox persists --- public/js/script.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 34b73d247..e1567a5e1 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -145,15 +145,12 @@ function copyResultToClipboard() { } function activateFunbox(funbox, mode) { + $("#funBoxTheme").attr("href", ``); if (funbox === "none") { - $("#funBoxTheme").attr("href", ``); activeFunBox = "none"; } if (mode === "style") { - if (funbox == undefined) { - $("#funBoxTheme").attr("href", ``); - activeFunBox = "none"; - } else { + if (funbox != undefined) { $("#funBoxTheme").attr("href", `funbox/${funbox}.css`); activeFunBox = funbox; }