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); |
+ { |
+ 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); |
-} |
+}; |