| Left: | ||
| Right: |
| 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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1369 switch (key) | 1369 switch (key) |
| 1370 { | 1370 { |
| 1371 case "notifications_ignoredcategories": | 1371 case "notifications_ignoredcategories": |
| 1372 value = value.indexOf("*") == -1; | 1372 value = value.indexOf("*") == -1; |
| 1373 break; | 1373 break; |
| 1374 | 1374 |
| 1375 case "notifications_showui": | 1375 case "notifications_showui": |
| 1376 hidePref("notifications_ignoredcategories", !value); | 1376 hidePref("notifications_ignoredcategories", !value); |
| 1377 break; | 1377 break; |
| 1378 case "ui_warn_tracking": | 1378 case "ui_warn_tracking": |
| 1379 if (value) | 1379 let showWarning = (value && hasPrivacyConflict()); |
| 1380 E("acceptable-ads").classList.add("show-warning"); | 1380 E("acceptable-ads").classList.toggle("show-warning", showWarning); |
|
Thomas Greiner
2017/11/21 17:17:29
As hinted at in https://codereview.adblockplus.org
saroyanm
2017/11/21 18:17:35
Right, thanks, done.
| |
| 1381 else | |
| 1382 E("acceptable-ads").classList.remove("show-warning"); | |
| 1383 break; | 1381 break; |
| 1384 } | 1382 } |
| 1385 | 1383 |
| 1386 let checkbox = document.querySelector( | 1384 let checkbox = document.querySelector( |
| 1387 "[data-pref='" + key + "'] button[role='checkbox']" | 1385 "[data-pref='" + key + "'] button[role='checkbox']" |
| 1388 ); | 1386 ); |
| 1389 if (checkbox) | 1387 if (checkbox) |
| 1390 checkbox.setAttribute("aria-checked", value); | 1388 checkbox.setAttribute("aria-checked", value); |
| 1391 } | 1389 } |
| 1392 | 1390 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1460 }); | 1458 }); |
| 1461 browser.runtime.sendMessage({ | 1459 browser.runtime.sendMessage({ |
| 1462 type: "subscriptions.listen", | 1460 type: "subscriptions.listen", |
| 1463 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1461 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
| 1464 "title", "downloadStatus", "downloading"] | 1462 "title", "downloadStatus", "downloading"] |
| 1465 }); | 1463 }); |
| 1466 | 1464 |
| 1467 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1465 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
| 1468 window.addEventListener("hashchange", onHashChange, false); | 1466 window.addEventListener("hashchange", onHashChange, false); |
| 1469 } | 1467 } |
| LEFT | RIGHT |