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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 } | 1097 } |
1098 }); | 1098 }); |
1099 loadRecommendations(); | 1099 loadRecommendations(); |
1100 ext.backgroundPage.sendMessage({ | 1100 ext.backgroundPage.sendMessage({ |
1101 type: "prefs.get", | 1101 type: "prefs.get", |
1102 key: "subscriptions_exceptionsurl" | 1102 key: "subscriptions_exceptionsurl" |
1103 }, | 1103 }, |
1104 (url) => | 1104 (url) => |
1105 { | 1105 { |
1106 acceptableAdsUrl = url; | 1106 acceptableAdsUrl = url; |
1107 addSubscription({ | |
1108 url: acceptableAdsUrl, | |
1109 disabled: true | |
1110 }); | |
1111 | 1107 |
1112 ext.backgroundPage.sendMessage({ | 1108 ext.backgroundPage.sendMessage({ |
1113 type: "prefs.get", | 1109 type: "prefs.get", |
1114 key: "subscriptions_exceptionsurl_privacy" | 1110 key: "subscriptions_exceptionsurl_privacy" |
1115 }, | 1111 }, |
1116 (urlPrivacy) => | 1112 (urlPrivacy) => |
1117 { | 1113 { |
1118 acceptableAdsPrivacyUrl = urlPrivacy; | 1114 acceptableAdsPrivacyUrl = urlPrivacy; |
1119 | 1115 |
1120 // Load user subscriptions | 1116 // Load user subscriptions |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 }); | 1401 }); |
1406 ext.backgroundPage.sendMessage({ | 1402 ext.backgroundPage.sendMessage({ |
1407 type: "subscriptions.listen", | 1403 type: "subscriptions.listen", |
1408 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1404 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1409 "title", "downloadStatus", "downloading"] | 1405 "title", "downloadStatus", "downloading"] |
1410 }); | 1406 }); |
1411 | 1407 |
1412 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1408 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1413 window.addEventListener("hashchange", onHashChange, false); | 1409 window.addEventListener("hashchange", onHashChange, false); |
1414 } | 1410 } |
OLD | NEW |