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

Unified Diff: lib/stats.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
Index: lib/stats.js
===================================================================
--- a/lib/stats.js
+++ b/lib/stats.js
@@ -12,34 +12,31 @@
* 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 stats */
-"use strict";
-
-const {Prefs} = require("prefs");
-const {BlockingFilter} = require("filterClasses");
-const {FilterNotifier} = require("filterNotifier");
-const {port} = require("messaging");
+import {Prefs} from "prefs";
+import {BlockingFilter} from "filterClasses";
+import {FilterNotifier} from "filterNotifier";
+import {port} from "messaging";
const badgeColor = "#646464";
let blockedPerPage = new ext.PageMap();
-let getBlockedPerPage =
/**
* Gets the number of requests blocked on the given page.
*
* @param {Page} page
* @return {Number}
*/
-exports.getBlockedPerPage = page => blockedPerPage.get(page) || 0;
+export const getBlockedPerPage = page => blockedPerPage.get(page) || 0;
// Chrome automatically clears the browser action badge text when the URL of
// the tab is updated, but Firefox doesn't.
// https://bugzilla.mozilla.org/show_bug.cgi?id=1395074
ext.pages.onLoading.addListener(page =>
{
if (!blockedPerPage.get(page))
page.browserAction.setBadge();
« lib/.eslintrc.json ('K') | « lib/requestBlocker.js ('k') | lib/subscriptionInit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld