Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -253,48 +253,13 @@ |
Prefs.onLoaded._dispatch(); |
}; |
- // Migrate preferences for users updating from old versions. |
- // TODO: Remove the migration code after a few releases. |
- ext.storage.migratePrefs({ |
- map: function(key, value) |
- { |
- if (key in defaults || key == "stats_total") |
- { |
- if (key != "currentVersion") |
- { |
- try |
- { |
- value = JSON.parse(value); |
- } |
- catch (e) |
- { |
- return null; |
- } |
- } |
+ ext.storage.get(prefs.map(prefToKey), function(items) |
+ { |
+ for (let key in items) |
+ overrides[keyToPref(key)] = items[key]; |
- if (key == "stats_total") |
- { |
- key = "blocked_total"; |
- value = value.blocked; |
- } |
- |
- return {key: prefToKey(key), value: value}; |
- } |
- |
- return null; |
- }, |
- |
- done: function() |
- { |
- ext.storage.get(prefs.map(prefToKey), function(items) |
- { |
- for (let key in items) |
- overrides[keyToPref(key)] = items[key]; |
- |
- localLoaded = true; |
- checkLoaded(); |
- }); |
- } |
+ localLoaded = true; |
+ checkLoaded(); |
}); |
if (require("info").platform == "chromium" && "managed" in chrome.storage) |