Index: lib/prefs.js |
=================================================================== |
--- a/lib/prefs.js |
+++ b/lib/prefs.js |
@@ -12,19 +12,17 @@ |
* GNU General Public License for more details. |
* |
* 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"); |
+import {EventEmitter} from "events"; |
const keyPrefix = "pref:"; |
let eventEmitter = new EventEmitter(); |
let overrides = Object.create(null); |
/** @lends module:prefs.Prefs */ |
let defaults = Object.create(null); |
@@ -207,17 +205,17 @@ |
* @type {number} |
*/ |
defaults.last_updates_page_displayed = 0; |
/** |
* @namespace |
* @static |
*/ |
-let Prefs = exports.Prefs = { |
+export const Prefs = { |
/** |
* Adds a callback that is called when the |
* value of a specified preference changed. |
* |
* @param {string} preference |
* @param {function} callback |
*/ |
on(preference, callback) |