aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan@mozilla.com>2010-05-30 22:35:19 -0400
committerEhsan Akhgari <ehsan@mozilla.com>2010-05-30 22:35:19 -0400
commited1ec00e5834da02255ece0f44a0b7b36e2f5265 (patch)
treeb5845ce41ac2b4fa43f53957f329b71b741826a5 /lib
parent6d1184b19d79d28204fdc0942c4b0b762aeb8e95 (diff)
downloadbugzilla-triage-ed1ec00e5834da02255ece0f44a0b7b36e2f5265.tar.gz
Port to using the preferences-service package
Diffstat (limited to 'lib')
-rw-r--r--lib/main.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/main.js b/lib/main.js
index 67ad375..77a4dd9 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -1042,10 +1042,8 @@ function autoCompleteUser(doc, field, multiple) {
if (!doc.getElementById(helperID)) {
function getAuthParams() {
const BZTW_AC_DISABLE = "jetpack.bugzillaTweaks.userAutoCompleteDisabled";
- var prefs = Components.classes["@mozilla.org/preferences-service;1"].
- getService(Components.interfaces.nsIPrefBranch);
- if (prefs.prefHasUserValue(BZTW_AC_DISABLE) &&
- prefs.getBoolPref(BZTW_AC_DISABLE))
+ var prefs = require("preferences-service");
+ if (prefs.get(BZTW_AC_DISABLE, false))
return null;
var cm = Components.classes["@mozilla.org/cookiemanager;1"].