mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -40,8 +40,7 @@ export const loadAssets = (data: IAppearance) => {
|
||||
const defaultThemeAddress = `/appearance/themes/${data.mode === 1 ? "midnight" : "daylight"}/theme.css?v=${Constants.SIYUAN_VERSION}`;
|
||||
if (defaultStyleElement) {
|
||||
if (!defaultStyleElement.getAttribute("href").startsWith(defaultThemeAddress)) {
|
||||
defaultStyleElement.remove();
|
||||
addStyle(defaultThemeAddress, "themeDefaultStyle");
|
||||
defaultStyleElement.setAttribute("href", defaultThemeAddress)
|
||||
}
|
||||
} else {
|
||||
addStyle(defaultThemeAddress, "themeDefaultStyle");
|
||||
@@ -51,8 +50,7 @@ export const loadAssets = (data: IAppearance) => {
|
||||
const themeAddress = `/appearance/themes/${data.mode === 1 ? data.themeDark : data.themeLight}/theme.css?v=${data.themeVer}`;
|
||||
if (styleElement) {
|
||||
if (!styleElement.getAttribute("href").startsWith(themeAddress)) {
|
||||
styleElement.remove();
|
||||
addStyle(themeAddress, "themeStyle");
|
||||
styleElement.setAttribute("href", themeAddress)
|
||||
}
|
||||
} else {
|
||||
addStyle(themeAddress, "themeStyle");
|
||||
|
||||
Reference in New Issue
Block a user