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

Unified 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: Use addEventListener Created Oct. 5, 2017, 8:06 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: desktop-options.js
===================================================================
--- a/desktop-options.js
+++ b/desktop-options.js
@@ -181,17 +181,16 @@
});
// Load recommended subscriptions
loadRecommendations();
// Show user's filters
reloadFilters();
}
-$(loadOptions);
function convertSpecialSubscription(subscription)
{
for (let filter of subscription.filters)
{
if (whitelistedDomainRegexp.test(filter.text))
appendToListBox("excludedDomainsBox", RegExp.$1);
else
@@ -698,16 +697,18 @@
else if (typeof args[i] == "function")
{
links[i].href = "javascript:void(0);";
links[i].addEventListener("click", args[i], false);
}
}
}
+document.addEventListener("DOMContentLoaded", loadOptions);
+
ext.onMessage.addListener(message =>
Manish Jethani 2017/10/05 20:10:13 By the way I notice that this listener could get c
Manish Jethani 2017/10/05 20:12:34 It won't in practice though because of the recent
Sebastian Noack 2017/10/05 20:14:47 Unlikely, as the document isn't loaded over the ne
{
switch (message.type)
{
case "app.respond":
switch (message.action)
{
case "addSubscription":
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld