OLD | NEW |
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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 static_cast<JsValue&>(*this) = std::move(src); | 127 static_cast<JsValue&>(*this) = std::move(src); |
128 return *this; | 128 return *this; |
129 } | 129 } |
130 | 130 |
131 bool Subscription::IsListed() const | 131 bool Subscription::IsListed() const |
132 { | 132 { |
133 JsValue func = jsEngine->Evaluate("API.isListedSubscription"); | 133 JsValue func = jsEngine->Evaluate("API.isListedSubscription"); |
134 return func.Call(*this).AsBool(); | 134 return func.Call(*this).AsBool(); |
135 } | 135 } |
136 | 136 |
| 137 bool Subscription::IsDisabled() const |
| 138 { |
| 139 return GetProperty("disabled").AsBool(); |
| 140 } |
| 141 |
| 142 void Subscription::SetDisabled(bool value) |
| 143 { |
| 144 return SetProperty("disabled", value); |
| 145 } |
| 146 |
137 void Subscription::AddToList() | 147 void Subscription::AddToList() |
138 { | 148 { |
139 JsValue func = jsEngine->Evaluate("API.addSubscriptionToList"); | 149 JsValue func = jsEngine->Evaluate("API.addSubscriptionToList"); |
140 func.Call(*this); | 150 func.Call(*this); |
141 } | 151 } |
142 | 152 |
143 void Subscription::RemoveFromList() | 153 void Subscription::RemoveFromList() |
144 { | 154 { |
145 JsValue func = jsEngine->Evaluate("API.removeSubscriptionFromList"); | 155 JsValue func = jsEngine->Evaluate("API.removeSubscriptionFromList"); |
146 func.Call(*this); | 156 func.Call(*this); |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent
Url); | 609 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent
Url); |
600 if (filter) | 610 if (filter) |
601 { | 611 { |
602 return filter; | 612 return filter; |
603 } | 613 } |
604 currentUrl = parentUrl; | 614 currentUrl = parentUrl; |
605 } | 615 } |
606 while (urlIterator != documentUrls.end()); | 616 while (urlIterator != documentUrls.end()); |
607 return FilterPtr(); | 617 return FilterPtr(); |
608 } | 618 } |
OLD | NEW |