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

Side by Side Diff: desktop-options.js

Issue 29565799: Noissue - Load options on DOMContentLoaded rather than jQuery.ready (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 5, 2017, 7:40 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 179 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
180 "title", "downloadStatus", "downloading"] 180 "title", "downloadStatus", "downloading"]
181 }); 181 });
182 182
183 // Load recommended subscriptions 183 // Load recommended subscriptions
184 loadRecommendations(); 184 loadRecommendations();
185 185
186 // Show user's filters 186 // Show user's filters
187 reloadFilters(); 187 reloadFilters();
188 } 188 }
189 $(loadOptions); 189 $(document).on("DOMContentLoaded", loadOptions);
Sebastian Noack 2017/10/05 19:50:28 Why not avoiding jQuery at all and just use docume
Manish Jethani 2017/10/05 20:10:13 Yes, that makes sense. Done. (I've also moved it
190 190
191 function convertSpecialSubscription(subscription) 191 function convertSpecialSubscription(subscription)
192 { 192 {
193 for (let filter of subscription.filters) 193 for (let filter of subscription.filters)
194 { 194 {
195 if (whitelistedDomainRegexp.test(filter.text)) 195 if (whitelistedDomainRegexp.test(filter.text))
196 appendToListBox("excludedDomainsBox", RegExp.$1); 196 appendToListBox("excludedDomainsBox", RegExp.$1);
197 else 197 else
198 appendToListBox("userFiltersBox", filter.text); 198 appendToListBox("userFiltersBox", filter.text);
199 } 199 }
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 onFilterMessage(message.action, message.args[0]); 738 onFilterMessage(message.action, message.args[0]);
739 break; 739 break;
740 case "prefs.respond": 740 case "prefs.respond":
741 onPrefMessage(message.action, message.args[0]); 741 onPrefMessage(message.action, message.args[0]);
742 break; 742 break;
743 case "subscriptions.respond": 743 case "subscriptions.respond":
744 onSubscriptionMessage(message.action, message.args[0]); 744 onSubscriptionMessage(message.action, message.args[0]);
745 break; 745 break;
746 } 746 }
747 }); 747 });
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