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 |
1121 ext.backgroundPage.sendMessage({ | 1117 ext.backgroundPage.sendMessage({ |
1122 type: "subscriptions.get", | 1118 type: "subscriptions.get", |
1123 downloadable: true | 1119 downloadable: true |
1124 }, | 1120 }, |
1125 (subscriptions) => | 1121 (subscriptions) => |
1126 { | 1122 { |
1127 for (let subscription of subscriptions) | 1123 for (let subscription of subscriptions) |
1128 onSubscriptionMessage("added", subscription); | 1124 onSubscriptionMessage("added", subscription); |
| 1125 |
| 1126 setAcceptableAds(); |
1129 }); | 1127 }); |
1130 }); | 1128 }); |
1131 }); | 1129 }); |
1132 } | 1130 } |
1133 | 1131 |
1134 function addWhitelistedDomain() | 1132 function addWhitelistedDomain() |
1135 { | 1133 { |
1136 let domain = E("whitelisting-textbox"); | 1134 let domain = E("whitelisting-textbox"); |
1137 for (let whitelistItem of collections.whitelist.items) | 1135 for (let whitelistItem of collections.whitelist.items) |
1138 { | 1136 { |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 }); | 1403 }); |
1406 ext.backgroundPage.sendMessage({ | 1404 ext.backgroundPage.sendMessage({ |
1407 type: "subscriptions.listen", | 1405 type: "subscriptions.listen", |
1408 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1406 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1409 "title", "downloadStatus", "downloading"] | 1407 "title", "downloadStatus", "downloading"] |
1410 }); | 1408 }); |
1411 | 1409 |
1412 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1410 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1413 window.addEventListener("hashchange", onHashChange, false); | 1411 window.addEventListener("hashchange", onHashChange, false); |
1414 } | 1412 } |
OLD | NEW |