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

Unified Diff: stats.js

Issue 29567798: Noissue - Replace ext.pages.open with tabs.create (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 6, 2017, 3:16 p.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
« no previous file with comments | « notification.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: stats.js
===================================================================
--- a/stats.js
+++ b/stats.js
@@ -16,18 +16,16 @@
*/
/* global i18n, getPref, togglePref */
"use strict";
(function()
{
- const {require} = ext.backgroundPage.getWindow();
-
const {FilterNotifier} = require("filterNotifier");
let currentTab;
const shareURL = "https://adblockplus.org/";
let messageMark = {};
let shareLinks = {
facebook: ["https://www.facebook.com/dialog/feed", {
@@ -128,17 +126,19 @@
getPref("blocked_total", blockedTotal =>
{
// Easter Egg
if (blockedTotal <= 9000 || blockedTotal >= 10000)
blockedTotal = blockedTotal.toLocaleString();
else
blockedTotal = i18n.getMessage("stats_over", (9000).toLocaleString());
- ext.pages.open(createShareLink(ev.target.dataset.social, blockedTotal));
+ chrome.tabs.create({
+ url: createShareLink(ev.target.dataset.social, blockedTotal)
+ });
});
}
function toggleIconNumber()
{
togglePref("show_statsinicon", showStatsInIcon =>
{
document.getElementById("show-iconnumber").setAttribute(
« no previous file with comments | « notification.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld