| Index: lib/prefs.js |
| =================================================================== |
| --- a/lib/prefs.js |
| +++ b/lib/prefs.js |
| @@ -14,17 +14,17 @@ |
| * You should have received a copy of the GNU General Public License |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| /** @module prefs */ |
| "use strict"; |
| -const {EventEmitter} = require("events"); |
| +const {EventEmitter} = require("../adblockpluscore/lib/events"); |
| const keyPrefix = "pref:"; |
| let eventEmitter = new EventEmitter(); |
| let overrides = Object.create(null); |
| /** @lends module:prefs.Prefs */ |
| let defaults = Object.create(null); |
| @@ -260,17 +260,17 @@ |
| } |
| function savePref(pref) |
| { |
| ext.storage.set(prefToKey(pref), overrides[pref]); |
| } |
| let customSave = new Map(); |
| -if (require("info").platform == "gecko") |
| +if (require("../buildtools/info").platform == "gecko") |
| { |
| // Saving one storage value causes all others to be saved as well on Gecko. |
| // Make sure that updating ad counter doesn't cause the filters data to be |
| // saved frequently as a side-effect. |
| const MIN_UPDATE_INTERVAL = 60 * 1000; |
| let lastUpdate = -MIN_UPDATE_INTERVAL; |
| let updateScheduled = false; |
| customSave.set("blocked_total", pref => |