| 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-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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 std::string className = GetClass(); | 66 std::string className = GetClass(); |
| 67 if (className == "BlockingFilter") | 67 if (className == "BlockingFilter") |
| 68 return TYPE_BLOCKING; | 68 return TYPE_BLOCKING; |
| 69 else if (className == "WhitelistFilter") | 69 else if (className == "WhitelistFilter") |
| 70 return TYPE_EXCEPTION; | 70 return TYPE_EXCEPTION; |
| 71 else if (className == "ElemHideFilter") | 71 else if (className == "ElemHideFilter") |
| 72 return TYPE_ELEMHIDE; | 72 return TYPE_ELEMHIDE; |
| 73 else if (className == "ElemHideException") | 73 else if (className == "ElemHideException") |
| 74 return TYPE_ELEMHIDE_EXCEPTION; | 74 return TYPE_ELEMHIDE_EXCEPTION; |
| 75 else if (className == "ElemHideEmulationFilter") | 75 else if (className == "ElemHideEmulationFilter") |
| 76 return TYPE_TYPE_ELEMHIDE_EMULATION; | 76 return TYPE_ELEMHIDE_EMULATION; |
| 77 else if (className == "CommentFilter") | 77 else if (className == "CommentFilter") |
| 78 return TYPE_COMMENT; | 78 return TYPE_COMMENT; |
| 79 else | 79 else |
| 80 return TYPE_INVALID; | 80 return TYPE_INVALID; |
| 81 } | 81 } |
| 82 | 82 |
| 83 bool Filter::IsListed() const | 83 bool Filter::IsListed() const |
| 84 { | 84 { |
| 85 JsValue func = jsEngine->Evaluate("API.isListedFilter"); | 85 JsValue func = jsEngine->Evaluate("API.isListedFilter"); |
| 86 return func.Call(*this).AsBool(); | 86 return func.Call(*this).AsBool(); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent
Url); | 595 FilterPtr filter = GetWhitelistingFilter(currentUrl, contentTypeMask, parent
Url); |
| 596 if (filter) | 596 if (filter) |
| 597 { | 597 { |
| 598 return filter; | 598 return filter; |
| 599 } | 599 } |
| 600 currentUrl = parentUrl; | 600 currentUrl = parentUrl; |
| 601 } | 601 } |
| 602 while (urlIterator != documentUrls.end()); | 602 while (urlIterator != documentUrls.end()); |
| 603 return FilterPtr(); | 603 return FilterPtr(); |
| 604 } | 604 } |
| OLD | NEW |