Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 return FilterStorage.subscriptions.some( | 49 return FilterStorage.subscriptions.some( |
50 (subscription) => subscription.url == Prefs.subscriptions_exceptionsurl); | 50 (subscription) => subscription.url == Prefs.subscriptions_exceptionsurl); |
51 }, | 51 }, |
52 set acceptableAdsEnabled(acceptableAdsEnabled) | 52 set acceptableAdsEnabled(acceptableAdsEnabled) |
53 { | 53 { |
54 if (acceptableAdsEnabled != AdblockPlusApi.acceptableAdsEnabled) | 54 if (acceptableAdsEnabled != AdblockPlusApi.acceptableAdsEnabled) |
55 UI.toggleAcceptableAds(); | 55 UI.toggleAcceptableAds(); |
56 } | 56 } |
57 }; | 57 }; |
58 | 58 |
59 FilterNotifier.addListener(function filterListener(action) | 59 FilterNotifier.addListener(function filterListener(action) |
René Jeschke
2015/03/22 21:01:46
Oh, and from my side: we do not even really need t
Felix Dahlke
2015/03/22 21:13:28
Right, we _can't_ use it there, actually - interac
| |
60 { | 60 { |
61 if (action != "load") | 61 if (action != "load") |
62 return; | 62 return; |
63 | 63 |
64 FilterNotifier.removeListener(filterListener); | |
64 if (typeof AdblockPlusApi.filterLoadListener == "function") | 65 if (typeof AdblockPlusApi.filterLoadListener == "function") |
65 AdblockPlusApi.filterLoadListener(); | 66 AdblockPlusApi.filterLoadListener(); |
66 FilterNotifier.removeListener(filterListener); | |
Wladimir Palant
2015/03/22 19:23:34
Please remove listener as the very first thing - f
Felix Dahlke
2015/03/22 20:59:31
Done.
| |
67 }); | 67 }); |
LEFT | RIGHT |