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

Side by Side Diff: js/desktop-options.js

Issue 29712599: Issue 6420 - Fixed poping up whitelisted website notification for several custom filter lists (Closed)
Patch Set: Created March 1, 2018, 12:13 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 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 { 1149 {
1150 // Load filters 1150 // Load filters
1151 for (let subscription of subscriptions) 1151 for (let subscription of subscriptions)
1152 { 1152 {
1153 browser.runtime.sendMessage({ 1153 browser.runtime.sendMessage({
1154 type: "filters.get", 1154 type: "filters.get",
1155 subscriptionUrl: subscription.url 1155 subscriptionUrl: subscription.url
1156 }, 1156 },
1157 (filters) => 1157 (filters) =>
1158 { 1158 {
1159 // Reset each time as there might be several custom filters
1160 if (isCustomFiltersLoaded)
1161 isCustomFiltersLoaded = false;
Thomas Greiner 2018/03/02 11:43:57 Why not instead just move `isCustomFiltersLoaded =
saroyanm 2018/03/02 15:59:14 Agree, done.
Thomas Greiner 2018/03/02 16:40:43 What about the code you initially added?
saroyanm 2018/03/02 16:43:46 Which code ?
Thomas Greiner 2018/03/02 17:09:04 The new code from the first patch set.
saroyanm 2018/03/02 17:16:51 You mean the current one, right ? I don't remember
Thomas Greiner 2018/03/02 17:24:16 I mean this one: https://codereview.adblockplus.or
saroyanm 2018/03/05 12:14:52 We are using loop on top, but now we decided to re
saroyanm 2018/03/05 14:52:27 Done.
1159 loadCustomFilters(filters); 1162 loadCustomFilters(filters);
1160 }); 1163 });
1161 } 1164 }
1162 }); 1165 });
1163 loadRecommendations(); 1166 loadRecommendations();
1164 browser.runtime.sendMessage({ 1167 browser.runtime.sendMessage({
1165 type: "prefs.get", 1168 type: "prefs.get",
1166 key: "subscriptions_exceptionsurl" 1169 key: "subscriptions_exceptionsurl"
1167 }, 1170 },
1168 (url) => 1171 (url) =>
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 "ui_warn_tracking"] 1468 "ui_warn_tracking"]
1466 }); 1469 });
1467 browser.runtime.sendMessage({ 1470 browser.runtime.sendMessage({
1468 type: "subscriptions.listen", 1471 type: "subscriptions.listen",
1469 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1472 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1470 "title", "downloadStatus", "downloading"] 1473 "title", "downloadStatus", "downloading"]
1471 }); 1474 });
1472 1475
1473 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1476 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1474 window.addEventListener("hashchange", onHashChange, false); 1477 window.addEventListener("hashchange", onHashChange, false);
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