mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-08 19:06:38 +00:00
Refactor ZenThemesImporter to remove unnecessary chrome URL match; update migration version in ZenUIMigration for consistency
This commit is contained in:
@@ -313,10 +313,8 @@ gZenActorsManager.addJSWindowActor('ZenThemeMarketplace', {
|
|||||||
DOMContentLoaded: {},
|
DOMContentLoaded: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
includeChrome: true,
|
|
||||||
matches: [
|
matches: [
|
||||||
...Services.prefs.getStringPref('zen.injections.match-urls').split(','),
|
...Services.prefs.getStringPref('zen.injections.match-urls').split(','),
|
||||||
'about:preferences',
|
'about:preferences'
|
||||||
'chrome://browser/content/browser.xhtml',
|
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@@ -6,7 +6,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
|||||||
|
|
||||||
class ZenUIMigration {
|
class ZenUIMigration {
|
||||||
PREF_NAME = 'zen.migration.version';
|
PREF_NAME = 'zen.migration.version';
|
||||||
MIGRATION_VERSION = 2;
|
MIGRATION_VERSION = 1;
|
||||||
|
|
||||||
init(isNewProfile, win) {
|
init(isNewProfile, win) {
|
||||||
if (!isNewProfile) {
|
if (!isNewProfile) {
|
||||||
@@ -27,9 +27,6 @@ class ZenUIMigration {
|
|||||||
if (this._migrationVersion < 1) {
|
if (this._migrationVersion < 1) {
|
||||||
this._migrateV1(win);
|
this._migrateV1(win);
|
||||||
}
|
}
|
||||||
if (this._migrationVersion < 2) {
|
|
||||||
this._migrateV2(win);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clearVariables() {
|
clearVariables() {
|
||||||
@@ -60,11 +57,6 @@ class ZenUIMigration {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async _migrateV2(win) {
|
|
||||||
// Just check for mods updates until we get an actual implementation
|
|
||||||
document.dispatchEvent(new CustomEvent('ZenCheckForThemeUpdates'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export var gZenUIMigration = new ZenUIMigration();
|
export var gZenUIMigration = new ZenUIMigration();
|
||||||
|
Reference in New Issue
Block a user