Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -104,12 +104,11 @@ |
*/ |
defaults.notificationurl = "https://notification.adblockplus.org/notification.json"; |
/** |
- * The total number of ads blocked on all pages. |
+ * The total number of requests blocked by the extension. |
* |
- * @type {object} |
- * @property {number} [blocked] |
+ * @type {number} |
*/ |
-defaults.stats_total = {}; |
+defaults.blocked_total = 0; |
/** |
* Whether to show a badge in the toolbar icon indicating the number of blocked ads. |
* |
@@ -246,7 +245,7 @@ |
ext.storage.migratePrefs({ |
map: function(key, value) |
{ |
- if (key in defaults) |
+ if (key in defaults || key == "stats_total") |
{ |
if (key != "currentVersion") |
{ |
@@ -260,6 +259,12 @@ |
} |
} |
+ if (key == "stats_total") |
+ { |
+ key = "blocked_total"; |
+ value = value.blocked; |
+ } |
+ |
return {key: prefToKey(key), value: value}; |
} |