LEFT | RIGHT |
1 /* | 1 /* |
2 * This file is part of the Adblock Plus extension, | 2 * This file is part of the Adblock Plus extension, |
3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // TODO, this currently crashes due to errors reported on a thread | 91 // TODO, this currently crashes due to errors reported on a thread |
92 //if (!subscription.lastDownload) | 92 //if (!subscription.lastDownload) |
93 // Synchronizer.execute(subscription); | 93 // Synchronizer.execute(subscription); |
94 }, | 94 }, |
95 | 95 |
96 removeSubscriptionFromList: function(subscription) | 96 removeSubscriptionFromList: function(subscription) |
97 { | 97 { |
98 FilterStorage.removeSubscription(subscription); | 98 FilterStorage.removeSubscription(subscription); |
99 }, | 99 }, |
100 | 100 |
| 101 updateSubscription: function(subscription) |
| 102 { |
| 103 Synchronizer.execute(subscription); |
| 104 }, |
| 105 |
| 106 isSubscriptionUpdating: function(subscription) |
| 107 { |
| 108 return Synchronizer.isExecuting(subscription.url); |
| 109 }, |
| 110 |
101 getListedSubscriptions: function() | 111 getListedSubscriptions: function() |
102 { | 112 { |
103 return FilterStorage.subscriptions.filter(function(s) | 113 return FilterStorage.subscriptions.filter(function(s) |
104 { | 114 { |
105 return !(s instanceof SpecialSubscription) | 115 return !(s instanceof SpecialSubscription) |
106 }); | 116 }); |
107 }, | 117 }, |
108 | 118 |
109 checkFilterMatch: function(url, contentType, documentUrl) | 119 checkFilterMatch: function(url, contentType, documentUrl) |
110 { | 120 { |
111 // TODO: set thirdParty properly | 121 // TODO: set thirdParty properly |
112 var thirdParty = false; | 122 var thirdParty = false; |
113 return defaultMatcher.matchesAny(url, contentType, documentUrl, thirdParty
); | 123 return defaultMatcher.matchesAny(url, contentType, documentUrl, thirdParty
); |
114 }, | 124 }, |
115 | 125 |
116 getElementHidingSelectors: function(domain) | 126 getElementHidingSelectors: function(domain) |
117 { | 127 { |
118 return ElemHide.getSelectorsForDomain(domain, false); | 128 return ElemHide.getSelectorsForDomain(domain, false); |
119 } | 129 } |
120 }; | 130 }; |
121 })(); | 131 })(); |
LEFT | RIGHT |