Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/notification.js

Issue 29715555: Issue 6447 - Switch to Harmony modules in lib/* (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created March 6, 2018, 7:42 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« lib/common.js ('K') | « lib/matcher.js ('k') | lib/rsa.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« lib/common.js ('K') | « lib/matcher.js ('k') | lib/rsa.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld