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

Unified Diff: lib/antiadblockInit.js

Issue 29375899: Issue 4871 - Start using ESLint for adblockplusui (Closed)
Patch Set: Fix regressions with the new options page Created March 1, 2017, 8:25 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/antiadblockInit.js
diff --git a/lib/antiadblockInit.js b/lib/antiadblockInit.js
index ac9ef424ab902bf0c3c18a0e0771a6b840d7a429..ad78fcc572ae0fda76c32e7065792cf254c52b1e 100644
--- a/lib/antiadblockInit.js
+++ b/lib/antiadblockInit.js
@@ -15,6 +15,10 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
+/* globals Cu */
+
+"use strict";
+
Cu.import("resource://gre/modules/Services.jsm");
let {Utils} = require("utils");
@@ -52,7 +56,8 @@ exports.initAntiAdblockNotification = function initAntiAdblockNotification()
for (let domain in filter.domains)
{
let urlFilter = "||" + domain + "^$document";
- if (domain && filter.domains[domain] && urlFilters.indexOf(urlFilter) == -1)
+ if (domain && filter.domains[domain] &&
+ urlFilters.indexOf(urlFilter) == -1)
urlFilters.push(urlFilter);
}
}
@@ -68,9 +73,11 @@ exports.initAntiAdblockNotification = function initAntiAdblockNotification()
Notification.removeQuestionListener(notification.id, notificationListener);
}
- let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
- if (subscription.lastDownload && subscription.disabled)
- addAntiAdblockNotification(subscription);
+ {
Thomas Greiner 2017/03/01 17:39:35 I assume this is necessary due to the "no-shadow"
kzar 2017/03/07 12:48:32 Done.
+ let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
+ if (subscription.lastDownload && subscription.disabled)
+ addAntiAdblockNotification(subscription);
+ }
function onSubscriptionChange(subscription)
{
@@ -87,4 +94,4 @@ exports.initAntiAdblockNotification = function initAntiAdblockNotification()
FilterNotifier.on("subscription.updated", onSubscriptionChange);
FilterNotifier.on("subscription.removed", onSubscriptionChange);
FilterNotifier.on("subscription.disabled", onSubscriptionChange);
-}
+};

Powered by Google App Engine
This is Rietveld