Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -1,6 +1,6 @@ |
/* |
* This file is part of Adblock Plus <https://adblockplus.org/>, |
- * Copyright (C) 2006-2016 Eyeo GmbH |
+ * Copyright (C) 2006-2017 eyeo GmbH |
* |
* Adblock Plus is free software: you can redistribute it and/or modify |
* it under the terms of the GNU General Public License version 3 as |
@@ -116,7 +116,8 @@ |
*/ |
defaults.blocked_total = 0; |
/** |
- * Whether to show a badge in the toolbar icon indicating the number of blocked ads. |
+ * Whether to show a badge in the toolbar icon indicating the number |
+ * of blocked ads. |
* |
* @type {boolean} |
*/ |
@@ -260,7 +261,8 @@ |
let prefs = Object.keys(defaults); |
prefs.forEach(addPreference); |
- let localLoaded = new Promise(resolve => { |
+ let localLoaded = new Promise(resolve => |
+ { |
ext.storage.get(prefs.map(prefToKey), items => |
{ |
for (let key in items) |
@@ -270,8 +272,9 @@ |
}); |
}); |
- let managedLoaded = new Promise(resolve => { |
- if (typeof chrome == "object" && "managed" in chrome.storage) |
+ let managedLoaded = new Promise(resolve => |
+ { |
+ if (require("info").platform == "chromium" && "managed" in chrome.storage) |
{ |
chrome.storage.managed.get(null, items => |
{ |