mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 23:39:59 +02:00
Fixed duplicate actors manager and glance can be disabled now
This commit is contained in:
parent
fb33d61d41
commit
41f178e840
2 changed files with 18 additions and 13 deletions
|
@ -9,7 +9,11 @@ var gZenActorsManager = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChromeUtils.registerWindowActor(...args);
|
try {
|
||||||
this._actors.add(args[0]);
|
ChromeUtils.registerWindowActor(...args);
|
||||||
|
this._actors.add(args[0]);
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(`Failed to register JSWindowActor: ${e}`);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,18 +163,19 @@
|
||||||
|
|
||||||
|
|
||||||
function registerWindowActors() {
|
function registerWindowActors() {
|
||||||
// TODO: Only if the pref is enabled
|
if (Services.prefs.getBoolPref("zen.glance.enabled", true)) {
|
||||||
gZenActorsManager.addJSWindowActor("ZenGlance", {
|
gZenActorsManager.addJSWindowActor("ZenGlance", {
|
||||||
parent: {
|
parent: {
|
||||||
esModuleURI: "chrome://browser/content/zen-components/actors/ZenGlanceParent.sys.mjs",
|
esModuleURI: "chrome://browser/content/zen-components/actors/ZenGlanceParent.sys.mjs",
|
||||||
},
|
|
||||||
child: {
|
|
||||||
esModuleURI: "chrome://browser/content/zen-components/actors/ZenGlanceChild.sys.mjs",
|
|
||||||
events: {
|
|
||||||
DOMContentLoaded: {},
|
|
||||||
},
|
},
|
||||||
},
|
child: {
|
||||||
});
|
esModuleURI: "chrome://browser/content/zen-components/actors/ZenGlanceChild.sys.mjs",
|
||||||
|
events: {
|
||||||
|
DOMContentLoaded: {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
registerWindowActors();
|
registerWindowActors();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue