making sure you cant switch out of or to the challenge themes during or after the test

This commit is contained in:
Jack 2020-07-25 00:39:28 +01:00
parent 7f3acbb8f3
commit 3fc397a6f6

View file

@ -532,10 +532,25 @@ function setMaxConfidence(mc, nosave) {
}
function previewTheme(name) {
if (
(testActive || resultVisible) &&
(config.theme === "nausea" || config.theme === "round_round_baby")
)
return;
if (resultVisible && (name === "nausea" || name === "round_round_baby"))
return;
$("#currentTheme").attr("href", `themes/${name}.css`);
}
function setTheme(name, nosave) {
if (
(testActive || resultVisible) &&
(config.theme === "nausea" || config.theme === "round_round_baby")
) {
return;
}
if (resultVisible && (name === "nausea" || name === "round_round_baby"))
return;
config.theme = name;
$("#currentTheme").attr("href", `themes/${name}.css`);
setTimeout(() => {