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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 | 66 |
67 var convertSubscription = convertObject.bind(null, ["disabled", | 67 var convertSubscription = convertObject.bind(null, ["disabled", |
68 "downloadStatus", "homepage", "lastDownload", "title", "url"]); | 68 "downloadStatus", "homepage", "lastDownload", "title", "url"]); |
69 var convertFilter = convertObject.bind(null, ["text"]); | 69 var convertFilter = convertObject.bind(null, ["text"]); |
70 | 70 |
71 var changeListeners = new global.ext.PageMap(); | 71 var changeListeners = new global.ext.PageMap(); |
72 var listenedPreferences = Object.create(null); | 72 var listenedPreferences = Object.create(null); |
73 var listenedFilterChanges = Object.create(null); | 73 var listenedFilterChanges = Object.create(null); |
74 var messageTypes = { | 74 var messageTypes = { |
75 "app": "app.listen", | 75 "app": "app.event", |
76 "filter": "filters.listen", | 76 "filter": "filters.event", |
77 "pref": "prefs.listen", | 77 "pref": "prefs.event", |
78 "subscription": "subscriptions.listen" | 78 "subscription": "subscriptions.event" |
79 }; | 79 }; |
80 | 80 |
81 function sendMessage(type, action) | 81 function sendMessage(type, action) |
82 { | 82 { |
83 var pages = changeListeners.keys(); | 83 var pages = changeListeners.keys(); |
84 if (pages.length == 0) | 84 if (pages.length == 0) |
85 return; | 85 return; |
86 | 86 |
87 var args = []; | 87 var args = []; |
88 for (var i = 2; i < arguments.length; i++) | 88 for (var i = 2; i < arguments.length; i++) |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 if (subscription instanceof DownloadableSubscription) | 395 if (subscription instanceof DownloadableSubscription) |
396 Synchronizer.execute(subscription, true); | 396 Synchronizer.execute(subscription, true); |
397 } | 397 } |
398 break; | 398 break; |
399 case "subscriptions.isDownloading": | 399 case "subscriptions.isDownloading": |
400 callback(Synchronizer.isExecuting(message.url)); | 400 callback(Synchronizer.isExecuting(message.url)); |
401 break; | 401 break; |
402 } | 402 } |
403 }); | 403 }); |
404 })(this); | 404 })(this); |
OLD | NEW |