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-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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 displays[j].textContent = title; | 230 displays[j].textContent = title; |
231 } | 231 } |
232 | 232 |
233 element.setAttribute("aria-label", title); | 233 element.setAttribute("aria-label", title); |
234 if (this.details[i].searchable) | 234 if (this.details[i].searchable) |
235 element.setAttribute("data-search", title.toLowerCase()); | 235 element.setAttribute("data-search", title.toLowerCase()); |
236 let controls = element.querySelectorAll(".control[role='checkbox']"); | 236 let controls = element.querySelectorAll(".control[role='checkbox']"); |
237 for (let control of controls) | 237 for (let control of controls) |
238 { | 238 { |
239 control.setAttribute("aria-checked", item.disabled == false); | 239 control.setAttribute("aria-checked", item.disabled == false); |
| 240 if (isAcceptableAds(item.url) && this == collections.filterLists && |
| 241 !item.disabled) |
| 242 { |
| 243 control.disabled = true; |
| 244 } |
240 } | 245 } |
241 if (additionalSubscriptions.includes(item.url)) | 246 if (additionalSubscriptions.includes(item.url)) |
242 { | 247 { |
243 element.classList.add("preconfigured"); | 248 element.classList.add("preconfigured"); |
244 let disablePreconfigures = | 249 let disablePreconfigures = |
245 element.querySelectorAll("[data-disable~='preconfigured']"); | 250 element.querySelectorAll("[data-disable~='preconfigured']"); |
246 for (let disablePreconfigure of disablePreconfigures) | 251 for (let disablePreconfigure of disablePreconfigures) |
247 disablePreconfigure.disabled = true; | 252 disablePreconfigure.disabled = true; |
248 } | 253 } |
249 | 254 |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 knownSubscription.originalTitle = subscription.title; | 1287 knownSubscription.originalTitle = subscription.title; |
1283 else | 1288 else |
1284 knownSubscription[property] = subscription[property]; | 1289 knownSubscription[property] = subscription[property]; |
1285 } | 1290 } |
1286 subscription = knownSubscription; | 1291 subscription = knownSubscription; |
1287 } | 1292 } |
1288 switch (action) | 1293 switch (action) |
1289 { | 1294 { |
1290 case "disabled": | 1295 case "disabled": |
1291 updateSubscription(subscription); | 1296 updateSubscription(subscription); |
1292 setPrivacyConflict(); | |
1293 | |
1294 if (isAcceptableAds(subscription.url)) | 1297 if (isAcceptableAds(subscription.url)) |
1295 setAcceptableAds(); | 1298 setAcceptableAds(); |
| 1299 |
| 1300 setPrivacyConflict(); |
1296 break; | 1301 break; |
1297 case "downloading": | 1302 case "downloading": |
1298 case "downloadStatus": | 1303 case "downloadStatus": |
1299 case "homepage": | 1304 case "homepage": |
1300 case "lastDownload": | 1305 case "lastDownload": |
1301 case "title": | 1306 case "title": |
1302 updateSubscription(subscription); | 1307 updateSubscription(subscription); |
1303 break; | 1308 break; |
1304 case "added": | 1309 case "added": |
1305 let {url} = subscription; | 1310 let {url} = subscription; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 "ui_warn_tracking"] | 1503 "ui_warn_tracking"] |
1499 }); | 1504 }); |
1500 port.postMessage({ | 1505 port.postMessage({ |
1501 type: "subscriptions.listen", | 1506 type: "subscriptions.listen", |
1502 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1507 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1503 "title", "downloadStatus", "downloading"] | 1508 "title", "downloadStatus", "downloading"] |
1504 }); | 1509 }); |
1505 | 1510 |
1506 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1511 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1507 window.addEventListener("hashchange", onHashChange, false); | 1512 window.addEventListener("hashchange", onHashChange, false); |
LEFT | RIGHT |