Refactor ZenThemesImporter to improve theme handling and preferences management

This commit is contained in:
mauro-balades 2024-09-21 18:05:53 +02:00
parent ef5da75e5e
commit 9ae715276c

View file

@ -172,8 +172,7 @@ var gZenThemeImporter = new (class {
} }
writeToDom(themesWithPreferences) { writeToDom(themesWithPreferences) {
const browser = ZenThemesCommon.currentBrowser; for (const browser of ZenThemesCommon.browsers) {
for (const { enabled, preferences, name } of themesWithPreferences) { for (const { enabled, preferences, name } of themesWithPreferences) {
const sanitizedName = `theme-${name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`; const sanitizedName = `theme-${name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`;
@ -231,6 +230,7 @@ var gZenThemeImporter = new (class {
} }
} }
} }
}
async writeStylesheet(themeList) { async writeStylesheet(themeList) {
const themes = []; const themes = [];