mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-02-12 21:04:58 +08:00
Updated previewTheme to set a variable
a variable is set whenever this function is called, so we can query the variable if the system is previewing a theme
This commit is contained in:
parent
41c487458e
commit
7999d460de
1 changed files with 2 additions and 1 deletions
|
|
@ -882,7 +882,7 @@ function setIndicateTypos(it, nosave) {
|
|||
}
|
||||
|
||||
|
||||
function previewTheme(name) {
|
||||
function previewTheme(name, setIsPreviewingVar = true) {
|
||||
if (
|
||||
(testActive || resultVisible) &&
|
||||
(config.theme === "nausea" || config.theme === "round_round_baby")
|
||||
|
|
@ -890,6 +890,7 @@ function previewTheme(name) {
|
|||
return;
|
||||
if (resultVisible && (name === "nausea" || name === "round_round_baby"))
|
||||
return;
|
||||
isPreviewingTheme = setIsPreviewingVar;
|
||||
$("#currentTheme").attr("href", `themes/${name}.css`);
|
||||
setTimeout(() => {
|
||||
refreshThemeColorObject();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue