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

Side by Side Diff: lib/antiadblockInit.js

Issue 29370594: [adblockplusui] Issue 4915 - Define ext for background pages in antiadblockInit.js (Closed)
Patch Set: Created Jan. 2, 2017, 9:23 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 12 matching lines...) Expand all
23 let {FilterStorage} = require("filterStorage"); 23 let {FilterStorage} = require("filterStorage");
24 let {FilterNotifier} = require("filterNotifier"); 24 let {FilterNotifier} = require("filterNotifier");
25 let {Subscription} = require("subscriptionClasses"); 25 let {Subscription} = require("subscriptionClasses");
26 let {Notification} = require("notification"); 26 let {Notification} = require("notification");
27 27
28 exports.initAntiAdblockNotification = function initAntiAdblockNotification() 28 exports.initAntiAdblockNotification = function initAntiAdblockNotification()
29 { 29 {
30 let notification = { 30 let notification = {
31 id: "antiadblock", 31 id: "antiadblock",
32 type: "question", 32 type: "question",
33 title: ext.i18n.getMessage("notification_antiadblock_title"), 33 title: Utils.getString("notification_antiadblock_title"),
34 message: ext.i18n.getMessage("notification_antiadblock_message"), 34 message: Utils.getString("notification_antiadblock_message"),
35 urlFilters: [] 35 urlFilters: []
36 }; 36 };
37 37
38 function notificationListener(approved) 38 function notificationListener(approved)
39 { 39 {
40 let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl); 40 let subscription = Subscription.fromURL(Prefs.subscriptions_antiadblockurl);
41 if (subscription.url in FilterStorage.knownSubscriptions) 41 if (subscription.url in FilterStorage.knownSubscriptions)
42 subscription.disabled = !approved; 42 subscription.disabled = !approved;
43 } 43 }
44 44
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (url in FilterStorage.knownSubscriptions && !subscription.disabled) 81 if (url in FilterStorage.knownSubscriptions && !subscription.disabled)
82 addAntiAdblockNotification(subscription); 82 addAntiAdblockNotification(subscription);
83 else 83 else
84 removeAntiAdblockNotification(); 84 removeAntiAdblockNotification();
85 } 85 }
86 86
87 FilterNotifier.on("subscription.updated", onSubscriptionChange); 87 FilterNotifier.on("subscription.updated", onSubscriptionChange);
88 FilterNotifier.on("subscription.removed", onSubscriptionChange); 88 FilterNotifier.on("subscription.removed", onSubscriptionChange);
89 FilterNotifier.on("subscription.disabled", onSubscriptionChange); 89 FilterNotifier.on("subscription.disabled", onSubscriptionChange);
90 } 90 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld