Index: src/engine/Main.cpp |
=================================================================== |
--- a/src/engine/Main.cpp |
+++ b/src/engine/Main.cpp |
@@ -114,13 +114,42 @@ |
std::string url; |
request >> url; |
+ AdblockPlus::JsValuePtr valuePtr = filterEngine->GetPref("subscriptions_exceptionsurl"); |
+ std::string aaUrl = ""; |
+ if (valuePtr->IsNull()) |
Eric
2014/07/18 19:26:48
Missing a ! negation?
Oleksandr
2014/07/18 19:44:00
Wow! That's awkward now :D
On 2014/07/18 19:26:48,
Eric
2014/07/18 19:52:10
There's always the infrequently used !!! operator,
|
+ { |
+ aaUrl = valuePtr->AsString(); |
+ } |
std::vector<AdblockPlus::SubscriptionPtr> subscriptions = filterEngine->GetListedSubscriptions(); |
+ |
+ // Remove all subscriptions, besides the Acceptable Ads |
for (size_t i = 0, count = subscriptions.size(); i < count; i++) |
- subscriptions[i]->RemoveFromList(); |
+ { |
+ if (subscriptions[i]->GetProperty("url")->AsString() != aaUrl) |
+ { |
+ subscriptions[i]->RemoveFromList(); |
+ } |
+ } |
filterEngine->GetSubscription(url)->AddToList(); |
break; |
} |
+ case Communication::PROC_ADD_SUBSCRIPTION: |
+ { |
+ std::string url; |
+ request >> url; |
+ |
+ filterEngine->GetSubscription(url)->AddToList(); |
+ break; |
+ } |
+ case Communication::PROC_REMOVE_SUBSCRIPTION: |
+ { |
+ std::string url; |
+ request >> url; |
+ |
+ filterEngine->GetSubscription(url)->RemoveFromList(); |
+ break; |
+ } |
case Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS: |
{ |
std::vector<AdblockPlus::SubscriptionPtr> subscriptions = filterEngine->GetListedSubscriptions(); |