Index: options.js |
=================================================================== |
--- a/options.js |
+++ b/options.js |
@@ -64,17 +64,16 @@ |
const addSubscription = wrapper({type: "subscriptions.add"}, |
"url", "title", "homepage"); |
const toggleSubscription = wrapper({type: "subscriptions.toggle"}, |
"url", "keepInstalled"); |
const updateSubscription = wrapper({type: "subscriptions.update"}, "url"); |
const importRawFilters = wrapper({type: "filters.importRaw"}, |
"text", "removeExisting"); |
const addFilter = wrapper({type: "filters.add"}, "text"); |
-const getFilters = wrapper({type: "filters.get"}, "subscriptionUrl"); |
const removeFilter = wrapper({type: "filters.remove"}, "text"); |
const whitelistedDomainRegexp = /^@@\|\|([^/:]+)\^\$document$/; |
const statusMessages = new Map([ |
["synchronize_invalid_url", |
"filters_subscription_lastDownload_invalidURL"], |
["synchronize_connection_error", |
"filters_subscription_lastDownload_connectionError"], |
@@ -182,26 +181,23 @@ |
// Show user's filters |
reloadFilters(); |
} |
$(loadOptions); |
function convertSpecialSubscription(subscription) |
{ |
- getFilters(subscription.url, filters => |
+ for (let filter of subscription.filters) |
{ |
- for (let filter of filters) |
- { |
- if (whitelistedDomainRegexp.test(filter.text)) |
- appendToListBox("excludedDomainsBox", RegExp.$1); |
- else |
- appendToListBox("userFiltersBox", filter.text); |
- } |
- }); |
+ if (whitelistedDomainRegexp.test(filter.text)) |
+ appendToListBox("excludedDomainsBox", RegExp.$1); |
+ else |
+ appendToListBox("userFiltersBox", filter.text); |
+ } |
} |
// Reloads the displayed subscriptions and filters |
function reloadFilters() |
{ |
// Load user filter URLs |
let container = document.getElementById("filterLists"); |
while (container.lastChild) |