mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
Do not repaint theme on page load
This commit is contained in:
parent
0260bcbf3b
commit
a56ad36a42
1 changed files with 7 additions and 3 deletions
|
@ -63,8 +63,8 @@ if (typeof userSettings.userStyles === "string" && !noCSSparamReg.test(window.lo
|
||||||
$userStyles.html(userSettings.userStyles);
|
$userStyles.html(userSettings.userStyles);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof userSettings.theme === "string") {
|
if (typeof userSettings.theme === "string" && $theme.attr("href") !== `themes/${userSettings.theme}.css`) {
|
||||||
$theme.prop("href", `themes/${userSettings.theme}.css`);
|
$theme.attr("href", `themes/${userSettings.theme}.css`);
|
||||||
}
|
}
|
||||||
|
|
||||||
userSettings = null;
|
userSettings = null;
|
||||||
|
@ -110,7 +110,11 @@ function applySetting(name, value) {
|
||||||
} else if (name === "coloredNicks") {
|
} else if (name === "coloredNicks") {
|
||||||
$chat.toggleClass("colored-nicks", value);
|
$chat.toggleClass("colored-nicks", value);
|
||||||
} else if (name === "theme") {
|
} else if (name === "theme") {
|
||||||
$theme.prop("href", `themes/${value}.css`);
|
value = `themes/${value}.css`;
|
||||||
|
|
||||||
|
if ($theme.attr("href") !== value) {
|
||||||
|
$theme.attr("href", value);
|
||||||
|
}
|
||||||
} else if (name === "userStyles" && !noCSSparamReg.test(window.location.search)) {
|
} else if (name === "userStyles" && !noCSSparamReg.test(window.location.search)) {
|
||||||
$userStyles.html(value);
|
$userStyles.html(value);
|
||||||
} else if (name === "highlights") {
|
} else if (name === "highlights") {
|
||||||
|
|
Loading…
Reference in a new issue