From c3841209380e296f22f7f062d69abb790cc45391 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 11 Aug 2020 14:57:00 +0100 Subject: [PATCH] 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; }