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

Side by Side Diff: new-options.js

Issue 29558637: Issue 5806 - Acceptable ads being added to the UI on load (Closed)
Patch Set: Created Sept. 28, 2017, 5:03 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 E("whitelisting-textbox").setAttribute("placeholder", exampleValue); 875 E("whitelisting-textbox").setAttribute("placeholder", exampleValue);
876 E("whitelisting-textbox").addEventListener("keyup", (e) => 876 E("whitelisting-textbox").addEventListener("keyup", (e) =>
877 { 877 {
878 E("whitelisting-add-button").disabled = !e.target.value; 878 E("whitelisting-add-button").disabled = !e.target.value;
879 }, false); 879 }, false);
880 880
881 getDocLink("contribute", (link) => 881 getDocLink("contribute", (link) =>
882 { 882 {
883 E("contribute").href = link; 883 E("contribute").href = link;
884 }); 884 });
885
886 // General tab
887 setAcceptableAds();
885 getDocLink("acceptable_ads_criteria", (link) => 888 getDocLink("acceptable_ads_criteria", (link) =>
886 { 889 {
887 setLinks("enable-aa-description", link); 890 setLinks("enable-aa-description", link);
888 }); 891 });
889 getDocLink("adblock_plus_{browser}_dnt", url => 892 getDocLink("adblock_plus_{browser}_dnt", url =>
890 { 893 {
891 setLinks("dnt", url); 894 setLinks("dnt", url);
892 }); 895 });
893 896
894 // Advanced tab 897 // Advanced tab
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 } 1100 }
1098 }); 1101 });
1099 loadRecommendations(); 1102 loadRecommendations();
1100 ext.backgroundPage.sendMessage({ 1103 ext.backgroundPage.sendMessage({
1101 type: "prefs.get", 1104 type: "prefs.get",
1102 key: "subscriptions_exceptionsurl" 1105 key: "subscriptions_exceptionsurl"
1103 }, 1106 },
1104 (url) => 1107 (url) =>
1105 { 1108 {
1106 acceptableAdsUrl = url; 1109 acceptableAdsUrl = url;
1107 addSubscription({
1108 url: acceptableAdsUrl,
1109 disabled: true
1110 });
1111 1110
1112 ext.backgroundPage.sendMessage({ 1111 ext.backgroundPage.sendMessage({
1113 type: "prefs.get", 1112 type: "prefs.get",
1114 key: "subscriptions_exceptionsurl_privacy" 1113 key: "subscriptions_exceptionsurl_privacy"
1115 }, 1114 },
1116 (urlPrivacy) => 1115 (urlPrivacy) =>
1117 { 1116 {
1118 acceptableAdsPrivacyUrl = urlPrivacy; 1117 acceptableAdsPrivacyUrl = urlPrivacy;
1119 1118
1120 // Load user subscriptions 1119 // Load user subscriptions
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 }); 1404 });
1406 ext.backgroundPage.sendMessage({ 1405 ext.backgroundPage.sendMessage({
1407 type: "subscriptions.listen", 1406 type: "subscriptions.listen",
1408 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1407 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1409 "title", "downloadStatus", "downloading"] 1408 "title", "downloadStatus", "downloading"]
1410 }); 1409 });
1411 1410
1412 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1411 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1413 window.addEventListener("hashchange", onHashChange, false); 1412 window.addEventListener("hashchange", onHashChange, false);
1414 } 1413 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld