Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -12,23 +12,19 @@ let preconfiguredBranch = |
Services.prefs.getBranch(branchName + "preconfigured."); |
let ignorePrefChanges = false; |
function init() |
{ |
// Load default preferences and set up properties for them |
let defaultBranch = Services.prefs.getDefaultBranch(branchName); |
- let request = new XMLHttpRequest(); |
- request.open("GET", addonRoot + "defaults/prefs.json", false); |
- request.responseType = "json"; |
- request.send(); |
- |
- let defaults = request.response.defaults; |
- let preconfigurable = new Set(request.response.preconfigurable); |
+ let prefsData = require("prefs.json"); |
+ let defaults = prefsData.defaults; |
+ let preconfigurable = new Set(prefsData.preconfigurable); |
for (let pref in defaults) |
{ |
let value = defaults[pref]; |
let [getter, setter] = typeMap[typeof value]; |
if (preconfigurable.has(pref)) |
{ |
try |
{ |