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: Addressed Thomas' feedback Created March 7, 2017, 12:44 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 | « i18n.js ('k') | messageResponder.js » ('j') | 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..7275998ecb999a06f5cea4481865627c289432d4 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);
+ let antiAdblockSubscription = Subscription.fromURL(
+ Prefs.subscriptions_antiadblockurl
+ );
+ if (antiAdblockSubscription.lastDownload && antiAdblockSubscription.disabled)
+ addAntiAdblockNotification(antiAdblockSubscription);
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);
-}
+};
« no previous file with comments | « i18n.js ('k') | messageResponder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld