|
本帖最后由 Qter 于 2020-8-25 10:38 编辑
Services.prefs
- var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
- XPCOMUtils.defineLazyGetter(Services, "prefs", function() {
- return Cc["@mozilla.org/preferences-service;1"]
- .getService(Ci.nsIPrefService)
- .QueryInterface(Ci.nsIPrefBranch);
- });
- https://searchfox.org/comm-central/source/mozilla/modules/libpref/nsIPrefBranch.idl
- Services.prefs.getBoolPref("mailnews.reuse_message_window")
- var layoutView = Services.prefs.getIntPref("mail.pane_config.dynamic");
- Services.prefs.setIntPref("mail.displayname.version", currentDisplayNameVersion);
- Services.prefs.setCharPref("network.proxy.socks", value);
- Services.prefs.getPrefType("mailnews.reuse_message_window") == Ci.nsIPrefBranch.PREF_BOOL
-
-
- Services.prefs.removeObserver(this._autoHidePref, this);
- Services.prefs.addObserver(this.pref, this);
- Services.prefs.clearUserPref("mail.provider.suppress_dialog_on_startup");
- Services.prefs.addObserver("mail.openpgp.enable", MailPrefObserver);
- Services.prefs.removeObserver("mail.pane_config.dynamic", MailPrefObserver);
- Services.prefs.prefHasUserValue(prefix + "manualMark")
-
复制代码
|
|