Index: lib/notification.js |
=================================================================== |
--- a/lib/notification.js |
+++ b/lib/notification.js |
@@ -16,23 +16,23 @@ |
*/ |
"use strict"; |
/** |
* @fileOverview Handles notifications. |
*/ |
-const {Prefs} = require("prefs"); |
-const {Downloader, Downloadable, |
- MILLIS_IN_MINUTE, MILLIS_IN_HOUR, |
- MILLIS_IN_DAY} = require("./downloader"); |
-const {Utils} = require("utils"); |
-const {Matcher, defaultMatcher} = require("./matcher"); |
-const {Filter, RegExpFilter, WhitelistFilter} = require("./filterClasses"); |
+import {Prefs} from "prefs"; |
+import {Downloader, Downloadable, |
+ MILLIS_IN_MINUTE, MILLIS_IN_HOUR, |
+ MILLIS_IN_DAY} from "./downloader"; |
+import {Utils} from "utils"; |
+import {Matcher, defaultMatcher} from "./matcher"; |
+import {Filter, RegExpFilter, WhitelistFilter} from "./filterClasses"; |
const INITIAL_DELAY = 1 * MILLIS_IN_MINUTE; |
const CHECK_INTERVAL = 1 * MILLIS_IN_HOUR; |
const EXPIRATION_INTERVAL = 1 * MILLIS_IN_DAY; |
const TYPE = { |
information: 0, |
question: 1, |
relentless: 2, |
@@ -108,18 +108,17 @@ |
*/ |
let downloader = null; |
let localData = []; |
/** |
* Regularly fetches notifications and decides which to show. |
* @class |
*/ |
-let Notification = exports.Notification = |
-{ |
+export let Notification = { |
/** |
* Called on module startup. |
*/ |
init() |
{ |
downloader = new Downloader(this._getDownloadables.bind(this), |
INITIAL_DELAY, CHECK_INTERVAL); |
downloader.onExpirationChange = this._onExpirationChange.bind(this); |