RemoteTranslate: Use ZOTERO_CONFIG
This commit is contained in:
parent
4619949678
commit
3e6cfaf9ac
1 changed files with 4 additions and 4 deletions
|
@ -25,15 +25,15 @@
|
|||
|
||||
var EXPORTED_SYMBOLS = ["RemoteTranslate"];
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
ChromeUtils.import("chrome://zotero/content/actors/ActorManager.jsm");
|
||||
|
||||
ChromeUtils.defineESModuleGetters(this, {
|
||||
Zotero: "chrome://zotero/content/zotero.mjs",
|
||||
});
|
||||
|
||||
const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
TranslationManager: "chrome://zotero/content/actors/TranslationParent.jsm",
|
||||
ZOTERO_CONFIG: "resource://zotero/config.js",
|
||||
});
|
||||
|
||||
class RemoteTranslate {
|
||||
|
@ -277,7 +277,7 @@ class RemoteTranslate {
|
|||
}
|
||||
|
||||
_getPrefs(keys) {
|
||||
let rootBranch = 'extensions.zotero.'; // ZOTERO_CONFIG isn't available here
|
||||
let rootBranch = ZOTERO_CONFIG.PREF_BRANCH;
|
||||
let prefs = {};
|
||||
for (let key of keys) {
|
||||
if (key.endsWith('.')) {
|
||||
|
|
Loading…
Reference in a new issue