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

Delta Between Two Patch Sets: new-options.js

Issue 29519669: Issue 5539 - Implement "Acceptable Ads notification" (Closed)
Left Patch Set: Rebased Created Sept. 22, 2017, 10:05 a.m.
Right Patch Set: Addressed Thomas comment from patchset 6 Created Sept. 22, 2017, 10:28 a.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 | « new-options.html ('k') | skin/new-options.css » ('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 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 updateSubscription(subscription); 1198 updateSubscription(subscription);
1199 break; 1199 break;
1200 case "downloading": 1200 case "downloading":
1201 case "downloadStatus": 1201 case "downloadStatus":
1202 case "homepage": 1202 case "homepage":
1203 case "lastDownload": 1203 case "lastDownload":
1204 case "title": 1204 case "title":
1205 updateSubscription(subscription); 1205 updateSubscription(subscription);
1206 break; 1206 break;
1207 case "added": 1207 case "added":
1208 let {url} = subscription; 1208 let {url, recommended} = subscription;
1209 if (url in subscriptionsMap) 1209 if (url in subscriptionsMap)
1210 updateSubscription(subscription); 1210 updateSubscription(subscription);
1211 else 1211 else
1212 addSubscription(subscription); 1212 addSubscription(subscription);
1213 1213
1214 if (isAcceptableAds(url)) 1214 if (isAcceptableAds(url))
1215 setAcceptableAds(); 1215 setAcceptableAds();
1216 1216
1217 if (url == acceptableAdsUrl || subscription.recommended == "privacy") 1217 if ((url == acceptableAdsUrl || recommended == "privacy") &&
1218 hasPrivacyConflict())
1218 { 1219 {
1219 getPref("ui_warn_tracking", (showTrackingWarning) => 1220 getPref("ui_warn_tracking", (showTrackingWarning) =>
1220 { 1221 {
1221 if (hasPrivacyConflict() && showTrackingWarning) 1222 if (showTrackingWarning)
1222 openDialog("tracking"); 1223 openDialog("tracking");
1223 }); 1224 });
1224 } 1225 }
1225 1226
1226 collections.filterLists.addItem(subscription); 1227 collections.filterLists.addItem(subscription);
1227 break; 1228 break;
1228 case "removed": 1229 case "removed":
1229 if (subscription.recommended) 1230 if (subscription.recommended)
1230 { 1231 {
1231 subscription.disabled = true; 1232 subscription.disabled = true;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 }); 1377 });
1377 ext.backgroundPage.sendMessage({ 1378 ext.backgroundPage.sendMessage({
1378 type: "subscriptions.listen", 1379 type: "subscriptions.listen",
1379 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1380 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1380 "title", "downloadStatus", "downloading"] 1381 "title", "downloadStatus", "downloading"]
1381 }); 1382 });
1382 1383
1383 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1384 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1384 window.addEventListener("hashchange", onHashChange, false); 1385 window.addEventListener("hashchange", onHashChange, false);
1385 } 1386 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld