Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: desktop-options.js

Issue 29609587: Issue 6031 - Implement Acceptable Ads notification (Closed)
Left Patch Set: Rebased Created Nov. 21, 2017, 2 p.m.
Right Patch Set: Created Nov. 21, 2017, 6:15 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « desktop-options.html ('k') | locale/en_US/desktop-options.json » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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.remove("show-warning"); 1380 E("acceptable-ads").classList.toggle("show-warning", showWarning);
1381 break; 1381 break;
1382 } 1382 }
1383 1383
1384 let checkbox = document.querySelector( 1384 let checkbox = document.querySelector(
1385 "[data-pref='" + key + "'] button[role='checkbox']" 1385 "[data-pref='" + key + "'] button[role='checkbox']"
1386 ); 1386 );
1387 if (checkbox) 1387 if (checkbox)
1388 checkbox.setAttribute("aria-checked", value); 1388 checkbox.setAttribute("aria-checked", value);
1389 } 1389 }
1390 1390
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 }); 1458 });
1459 browser.runtime.sendMessage({ 1459 browser.runtime.sendMessage({
1460 type: "subscriptions.listen", 1460 type: "subscriptions.listen",
1461 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1461 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1462 "title", "downloadStatus", "downloading"] 1462 "title", "downloadStatus", "downloading"]
1463 }); 1463 });
1464 1464
1465 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1465 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1466 window.addEventListener("hashchange", onHashChange, false); 1466 window.addEventListener("hashchange", onHashChange, false);
1467 } 1467 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld