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 26 matching lines...) Expand all Loading... |
37 var SpecialSubscription = subscriptionClasses.SpecialSubscription; | 37 var SpecialSubscription = subscriptionClasses.SpecialSubscription; |
38 | 38 |
39 function convertObject(keys, obj) | 39 function convertObject(keys, obj) |
40 { | 40 { |
41 var result = {}; | 41 var result = {}; |
42 for (var i = 0; i < keys.length; i++) | 42 for (var i = 0; i < keys.length; i++) |
43 result[keys[i]] = obj[keys[i]]; | 43 result[keys[i]] = obj[keys[i]]; |
44 return result; | 44 return result; |
45 } | 45 } |
46 | 46 |
47 var convertSubscription = convertObject.bind(null, ["disabled", "downloadStatu
s", | 47 var convertSubscription = convertObject.bind(null, ["disabled", |
48 "homepage", "lastSuccess", "title", "url"]); | 48 "downloadStatus", "homepage", "lastSuccess", "title", "url"]); |
49 var convertFilter = convertObject.bind(null, ["text"]); | 49 var convertFilter = convertObject.bind(null, ["text"]); |
50 | 50 |
51 var changeListeners = null; | 51 var changeListeners = null; |
52 var messageTypes = { | 52 var messageTypes = { |
53 "app": "app.listen", | 53 "app": "app.listen", |
54 "filter": "filters.listen", | 54 "filter": "filters.listen", |
55 "subscription": "subscriptions.listen" | 55 "subscription": "subscriptions.listen" |
56 }; | 56 }; |
57 | 57 |
58 function onFilterChange(action) | 58 function onFilterChange(action) |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 subscription.title = message.title; | 264 subscription.title = message.title; |
265 subscription.homepage = message.homepage; | 265 subscription.homepage = message.homepage; |
266 FilterStorage.addSubscription(subscription); | 266 FilterStorage.addSubscription(subscription); |
267 if (!subscription.lastDownload) | 267 if (!subscription.lastDownload) |
268 Synchronizer.execute(subscription); | 268 Synchronizer.execute(subscription); |
269 } | 269 } |
270 break; | 270 break; |
271 } | 271 } |
272 }); | 272 }); |
273 })(this); | 273 })(this); |
LEFT | RIGHT |