Left: | ||
Right: |
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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
230 } | 230 } |
231 | 231 |
232 element.setAttribute("aria-label", title); | 232 element.setAttribute("aria-label", title); |
233 if (this.details[i].searchable) | 233 if (this.details[i].searchable) |
234 element.setAttribute("data-search", title.toLowerCase()); | 234 element.setAttribute("data-search", title.toLowerCase()); |
235 let controls = element.querySelectorAll(".control[role='checkbox']"); | 235 let controls = element.querySelectorAll(".control[role='checkbox']"); |
236 for (let control of controls) | 236 for (let control of controls) |
237 { | 237 { |
238 control.setAttribute("aria-checked", item.disabled == false); | 238 control.setAttribute("aria-checked", item.disabled == false); |
239 if (isAcceptableAds(item.url) && this == collections.filterLists) | 239 if (isAcceptableAds(item.url) && this == collections.filterLists) |
240 { | |
240 control.disabled = true; | 241 control.disabled = true; |
242 } | |
243 else if (this == collections.filterLists) | |
saroyanm
2018/03/01 21:52:34
I wonder if I also should consider the case of rem
Thomas Greiner
2018/03/02 11:33:35
This if-statement is redundant because in the CSS
Thomas Greiner
2018/03/02 11:33:36
You're right that we should also consider other pl
saroyanm
2018/03/02 13:50:29
Done.
saroyanm
2018/03/02 13:50:29
Done. I moved implementation out of the for loop,
| |
244 { | |
245 // List preinstalled by administrators | |
Thomas Greiner
2018/03/02 11:33:35
Detail: This is already documented under https://h
saroyanm
2018/03/02 13:50:29
Done.
| |
246 getPref("additional_subscriptions", (additionalSubscriptions) => | |
247 { | |
248 if (additionalSubscriptions.includes(item.url)) | |
249 element.classList.add("non-removable"); | |
Thomas Greiner
2018/03/02 11:33:35
Detail: What about keeping the name more objective
saroyanm
2018/03/02 13:50:29
Done.
| |
250 }); | |
251 } | |
241 } | 252 } |
242 | 253 |
243 let lastUpdateElement = element.querySelector(".last-update"); | 254 let lastUpdateElement = element.querySelector(".last-update"); |
244 if (lastUpdateElement) | 255 if (lastUpdateElement) |
245 { | 256 { |
246 let message = element.querySelector(".message"); | 257 let message = element.querySelector(".message"); |
247 if (item.isDownloading) | 258 if (item.isDownloading) |
248 { | 259 { |
249 let text = getMessage("options_filterList_lastDownload_inProgress"); | 260 let text = getMessage("options_filterList_lastDownload_inProgress"); |
250 message.textContent = text; | 261 message.textContent = text; |
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1465 "ui_warn_tracking"] | 1476 "ui_warn_tracking"] |
1466 }); | 1477 }); |
1467 browser.runtime.sendMessage({ | 1478 browser.runtime.sendMessage({ |
1468 type: "subscriptions.listen", | 1479 type: "subscriptions.listen", |
1469 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1480 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1470 "title", "downloadStatus", "downloading"] | 1481 "title", "downloadStatus", "downloading"] |
1471 }); | 1482 }); |
1472 | 1483 |
1473 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1484 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1474 window.addEventListener("hashchange", onHashChange, false); | 1485 window.addEventListener("hashchange", onHashChange, false); |
OLD | NEW |