OLD | NEW |
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 if (!checkWhitelisted(sender.page, sender.frame, | 215 if (!checkWhitelisted(sender.page, sender.frame, |
216 RegExpFilter.typeMap.DOCUMENT | | 216 RegExpFilter.typeMap.DOCUMENT | |
217 RegExpFilter.typeMap.ELEMHIDE)) | 217 RegExpFilter.typeMap.ELEMHIDE)) |
218 { | 218 { |
219 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname); | 219 filters = CSSRules.getRulesForDomain(sender.frame.url.hostname); |
220 filters = filters.map(function(filter) | 220 filters = filters.map(function(filter) |
221 { | 221 { |
222 return { | 222 return { |
223 prefix: filter.selectorPrefix, | 223 prefix: filter.selectorPrefix, |
224 suffix: filter.selectorSuffix, | 224 suffix: filter.selectorSuffix, |
225 regexp: filter.regexpString | 225 regexp: filter.regexpString, |
| 226 text: filter.text |
226 }; | 227 }; |
227 }); | 228 }); |
228 } | 229 } |
229 callback(filters); | 230 callback(filters); |
230 break; | 231 break; |
231 } | 232 } |
232 | 233 |
233 var subscription = Subscription.fromURL(message.subscriptionUrl); | 234 var subscription = Subscription.fromURL(message.subscriptionUrl); |
234 if (!subscription) | 235 if (!subscription) |
235 { | 236 { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 if (subscription instanceof DownloadableSubscription) | 373 if (subscription instanceof DownloadableSubscription) |
373 Synchronizer.execute(subscription, true); | 374 Synchronizer.execute(subscription, true); |
374 } | 375 } |
375 break; | 376 break; |
376 case "subscriptions.isDownloading": | 377 case "subscriptions.isDownloading": |
377 callback(Synchronizer.isExecuting(message.url)); | 378 callback(Synchronizer.isExecuting(message.url)); |
378 break; | 379 break; |
379 } | 380 } |
380 }); | 381 }); |
381 })(this); | 382 })(this); |
OLD | NEW |