Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -41,7 +41,14 @@ |
update_hard_expiration: 0, |
currentVersion: "0.0", |
notificationdata: {}, |
- notificationurl: "https://notification.adblockplus.org/notification.json" |
+ notificationurl: "https://notification.adblockplus.org/notification.json", |
+ suppress_first_run_page: false, |
+ disable_auto_updates: false |
+}; |
+ |
+let isPreconfigurable = { |
Felix Dahlke
2015/06/11 20:21:13
I'd prefer this to work the same way as in Firefox
Oleksandr
2015/06/12 10:47:57
Done.
|
+ suppress_first_run_page: true, |
+ disable_auto_updates: true |
}; |
let values = Object.create(defaults); |
@@ -75,6 +82,15 @@ |
function load() |
{ |
+ // Set default prefs based on _preconfiguredPrefs |
+ for (let key in _preconfiguredPrefs) |
+ { |
+ if (isPreconfigurable[key]) |
+ { |
+ values[key] = _preconfiguredPrefs[key]; |
Eric
2015/06/10 17:48:16
Shouldn't this first check to see if there is a pr
Felix Dahlke
2015/06/11 20:21:13
Yes, should be: `if (key in _preconfiguredPrefs &&
Oleksandr
2015/06/12 07:36:14
Hm, am I missing something? I don't see why would
Felix Dahlke
2015/06/12 07:55:03
Yes you're right, guess me and Eric both missed th
|
+ } |
+ } |
+ |
_fileSystem.read(path, function(result) |
{ |
// prefs.json is expected to be missing, ignore errors reading file |