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

Unified Diff: lib/antiadblockInit.js

Issue 29370594: [adblockplusui] Issue 4915 - Define ext for background pages in antiadblockInit.js (Closed)
Patch Set: Use simple if instead of ternary operator Created March 3, 2017, 9:24 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/antiadblockInit.js
diff --git a/lib/antiadblockInit.js b/lib/antiadblockInit.js
index ac9ef424ab902bf0c3c18a0e0771a6b840d7a429..e48039e27a250ecdc9c46c771c7a927e532b47a0 100644
--- a/lib/antiadblockInit.js
+++ b/lib/antiadblockInit.js
@@ -25,6 +25,12 @@ let {FilterNotifier} = require("filterNotifier");
let {Subscription} = require("subscriptionClasses");
let {Notification} = require("notification");
+let ext;
+if (typeof window != "undefined" && window.ext)
+ ext = window.ext;
+else
+ ext = require("ext_background");
+
exports.initAntiAdblockNotification = function initAntiAdblockNotification()
{
let notification = {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld