refactor(zen-settings): add theme- prefix

This commit is contained in:
Bryan Galdámez 2024-09-14 16:53:22 -06:00
parent 9c29cf23e7
commit 5a183e161e

View file

@ -146,7 +146,7 @@ var gZenThemeImporter = new (class {
for (const theme of Object.values(await this.getThemes())) { for (const theme of Object.values(await this.getThemes())) {
const { preferences, areOldPreferences } = await this._getThemePreferences(theme); const { preferences, areOldPreferences } = await this._getThemePreferences(theme);
const sanitizedName = theme.name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, ''); const sanitizedName = `theme-${theme.name?.replaceAll(/\s/g, '-')?.replaceAll(/[^A-z_-]+/g, '')}`;
if (!theme.enabled) { if (!theme.enabled) {
const element = browser.document.getElementById(sanitizedName); const element = browser.document.getElementById(sanitizedName);