| 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(); |