Cu.import('resource://gre/modules/Services.jsm');
-function getBoolPref(pref, default) {
+function getBoolPref(pref, def) {
try {
return Services.prefs.getBoolPref(pref);
} catch (ex) {
- return default;
+ return def;
}
}
function setStringPref(pref, value) {
- let str = Cc["@mozilla.org/supports-string;1"]
+ let str = Cc['@mozilla.org/supports-string;1']
.createInstance(Ci.nsISupportsString);
str.data = value;
Services.prefs.setComplexValue(pref, Ci.nsISupportsString, str);
.getService(Ci.nsIPrivateBrowsingService);
let inPrivateBrowswing = privateBrowsing.privateBrowsingEnabled;
-function getBoolPref(pref, default) {
+function getBoolPref(pref, def) {
try {
return Services.prefs.getBoolPref(pref);
} catch (ex) {
- return default;
+ return def;
}
}
function setStringPref(pref, value) {
- let str = Cc["@mozilla.org/supports-string;1"]
+ let str = Cc['@mozilla.org/supports-string;1']
.createInstance(Ci.nsISupportsString);
str.data = value;
Services.prefs.setComplexValue(pref, Ci.nsISupportsString, str);
}
-function getStringPref(pref, default) {
+function getStringPref(pref, def) {
try {
return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data;
} catch (ex) {
- return default;
+ return def;
}
}