auto saving custom theme when applied from link

This commit is contained in:
Jack 2020-11-06 19:21:43 +00:00
parent a65b177334
commit f797f28bf3

View file

@ -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.",