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

Unified Diff: lib/subscriptionInit.js

Issue 29715577: Issue 6449 - Switch to Harmony modules (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Add lib/.eslintrc.json Created March 6, 2018, 10:30 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/.eslintrc.json ('K') | « lib/stats.js ('k') | lib/tldjs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/subscriptionInit.js
===================================================================
--- a/lib/subscriptionInit.js
+++ b/lib/subscriptionInit.js
@@ -12,18 +12,16 @@
* 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 subscriptionInit */
-"use strict";
-
const {Subscription, DownloadableSubscription,
SpecialSubscription} = require("subscriptionClasses");
const {FilterStorage} = require("filterStorage");
const {FilterNotifier} = require("filterNotifier");
const info = require("info");
const {Prefs} = require("prefs");
const {Synchronizer} = require("synchronizer");
const {Utils} = require("utils");
@@ -43,17 +41,17 @@
* gets notified (on the first run page) if the data appears incomplete
* and therefore will be reinitialized.
*/
function detectFirstRun()
{
firstRun = FilterStorage.subscriptions.length == 0;
if (firstRun && (!FilterStorage.firstRun || Prefs.currentVersion))
- exports.reinitialized = true;
+ reinitialized = true;
Prefs.currentVersion = info.addonVersion;
}
/**
* Determines whether to add the default ad blocking subscription.
* Returns true, if there are no filter subscriptions besides those
* other subscriptions added automatically, and no custom filters.
@@ -241,21 +239,21 @@
/**
* Indicates whether the default filter subscriptions have been added
* again because there weren't any subscriptions even though this wasn't
* the first run.
*
* @type {boolean}
*/
-exports.reinitialized = false;
+export let reinitialized = false;
/**
* Sets a callback that is called with an array of subscriptions to be added
* during initialization. The callback must return an array of subscriptions
* that will effectively be added.
*
* @param {function} callback
*/
-exports.setSubscriptionsCallback = callback =>
+export const setSubscriptionsCallback = callback =>
{
subscriptionsCallback = callback;
};
« lib/.eslintrc.json ('K') | « lib/stats.js ('k') | lib/tldjs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld