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

Unified Diff: notification.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 | « lib/subscriptionInit.js ('k') | stats.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: notification.js
===================================================================
--- a/notification.js
+++ b/notification.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/>.
*/
"use strict";
-const {require} = ext.backgroundPage.getWindow();
-
const {Utils} = require("utils");
const {Notification} = require("notification");
const {getActiveNotification, shouldDisplay} = require("notificationHelper");
function getDocLinks(notification)
{
if (!notification.links)
return [];
@@ -79,17 +77,17 @@
{
let link = event.target;
while (link && link !== messageElement && link.localName !== "a")
link = link.parentNode;
if (!link)
return;
event.preventDefault();
event.stopPropagation();
- ext.pages.open(link.href);
+ chrome.tabs.create({url: link.href});
});
let notificationElement = document.getElementById("notification");
notificationElement.className = notification.type;
notificationElement.hidden = false;
notificationElement.addEventListener("click", event =>
{
if (event.target.id == "notification-close")
« no previous file with comments | « lib/subscriptionInit.js ('k') | stats.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld