mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-18 03:26:07 +08:00
auto saving custom theme when applied from link
This commit is contained in:
parent
a65b177334
commit
f797f28bf3
1 changed files with 8 additions and 0 deletions
|
@ -5240,6 +5240,14 @@ $(document).ready(() => {
|
|||
theme = theme.split(",");
|
||||
config.customThemeColors = theme;
|
||||
showNotification("Custom theme applied", 1000);
|
||||
let save = [];
|
||||
$.each(
|
||||
$(".pageSettings .section.customTheme [type='color']"),
|
||||
(index, element) => {
|
||||
save.push($(element).attr("value"));
|
||||
}
|
||||
);
|
||||
setCustomThemeColors(save);
|
||||
} catch (e) {
|
||||
showNotification(
|
||||
"Something went wrong. Reverting to default custom colors.",
|
||||
|
|
Loading…
Add table
Reference in a new issue