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

Side by Side Diff: lib/antiadblockInit.js

Issue 29390575: Issue 5019 - Fixes anti adblock notification not being added on first run (Closed)
Patch Set: Created March 21, 2017, 9:59 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ); 79 );
80 if (antiAdblockSubscription.lastDownload && antiAdblockSubscription.disabled) 80 if (antiAdblockSubscription.lastDownload && antiAdblockSubscription.disabled)
81 addAntiAdblockNotification(antiAdblockSubscription); 81 addAntiAdblockNotification(antiAdblockSubscription);
82 82
83 function onSubscriptionChange(subscription) 83 function onSubscriptionChange(subscription)
84 { 84 {
85 let url = Prefs.subscriptions_antiadblockurl; 85 let url = Prefs.subscriptions_antiadblockurl;
86 if (url != subscription.url) 86 if (url != subscription.url)
87 return; 87 return;
88 88
89 if (url in FilterStorage.knownSubscriptions && !subscription.disabled) 89 if (url in FilterStorage.knownSubscriptions && subscription.disabled)
90 addAntiAdblockNotification(subscription); 90 addAntiAdblockNotification(subscription);
91 else 91 else
92 removeAntiAdblockNotification(); 92 removeAntiAdblockNotification();
93 } 93 }
94 94
95 FilterNotifier.on("subscription.updated", onSubscriptionChange); 95 FilterNotifier.on("subscription.updated", onSubscriptionChange);
96 FilterNotifier.on("subscription.removed", onSubscriptionChange); 96 FilterNotifier.on("subscription.removed", onSubscriptionChange);
97 FilterNotifier.on("subscription.disabled", onSubscriptionChange); 97 FilterNotifier.on("subscription.disabled", onSubscriptionChange);
98 }; 98 };
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