tenfourfox/browser/base/content/test/general/offlineByDefault.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

18 lines
561 B
JavaScript

var offlineByDefault = {
defaultValue: false,
prefBranch: SpecialPowers.Cc["@mozilla.org/preferences-service;1"].getService(SpecialPowers.Ci.nsIPrefBranch),
set: function(allow) {
try {
this.defaultValue = this.prefBranch.getBoolPref("offline-apps.allow_by_default");
} catch (e) {
this.defaultValue = false
}
this.prefBranch.setBoolPref("offline-apps.allow_by_default", allow);
},
reset: function() {
this.prefBranch.setBoolPref("offline-apps.allow_by_default", this.defaultValue);
}
}
offlineByDefault.set(false);