1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-07 21:49:58 +02:00

feat: Fixed disable all mods not working, b=no-bug, c=mods

This commit is contained in:
mr. m 2025-07-02 10:46:39 +02:00
parent f6da5047c2
commit 3b8202f207
No known key found for this signature in database
GPG key ID: 928E01ED4C97749F
2 changed files with 19 additions and 18 deletions

View file

@ -64,8 +64,6 @@
}
async #rebuildModsStylesheet() {
const shouldBeEnabled = !Services.prefs.getBoolPref('zen.themes.disable-all', false);
if (shouldBeEnabled) {
const mods = await this.#getEnabledMods();
await this.#writeStylesheet(mods);
@ -84,12 +82,15 @@
this.#setDefaults(modsWithPreferences);
this.#writeToDom(modsWithPreferences);
}
await this.#insertStylesheet();
}
async #getEnabledMods() {
if (Services.prefs.getBoolPref('zen.themes.disable-all', false)) {
console.log('[ZenMods]: Mods are disabled by user preference.');
return [];
}
const modsObject = await this.getMods();
const mods = Object.values(modsObject).filter(
(mod) => mod.enabled === undefined || mod.enabled

View file

@ -19,7 +19,7 @@
"brandShortName": "Zen",
"brandFullName": "Zen Browser",
"release": {
"displayVersion": "1.14.1b",
"displayVersion": "1.14.2b",
"github": {
"repo": "zen-browser/desktop"
},