| OLD | NEW |
| 1 #ifndef _PLUGIN_FILTER_H_ | 1 #ifndef _PLUGIN_FILTER_H_ |
| 2 #define _PLUGIN_FILTER_H_ | 2 #define _PLUGIN_FILTER_H_ |
| 3 | 3 |
| 4 | 4 |
| 5 #include "PluginTypedef.h" | 5 #include "PluginTypedef.h" |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include "..\shared\Utils.h" | 7 #include "..\shared\Utils.h" |
| 8 | 8 |
| 9 enum CFilterElementHideAttrPos | 9 enum CFilterElementHideAttrPos |
| 10 { | 10 { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 void ClearFilters(); | 156 void ClearFilters(); |
| 157 | 157 |
| 158 int FindMatch(const CString& src, CString filterPart, int startPos=0) const; | 158 int FindMatch(const CString& src, CString filterPart, int startPos=0) const; |
| 159 bool IsSpecialChar(TCHAR testChar) const; | 159 bool IsSpecialChar(TCHAR testChar) const; |
| 160 bool IsSubdomain(const CString& subdomain, const CString& domain) const; | 160 bool IsSubdomain(const CString& subdomain, const CString& domain) const; |
| 161 | 161 |
| 162 public: | 162 public: |
| 163 | 163 |
| 164 CPluginFilter(const CString& dataPath = ""); | 164 CPluginFilter(const CString& dataPath = ""); |
| 165 | 165 |
| 166 bool LoadHideFilters(std::vector<std::string> filters); | 166 bool LoadHideFilters(std::vector<std::wstring> filters); |
| 167 | 167 |
| 168 bool AddFilterElementHide(CString filter); | 168 bool AddFilterElementHide(CString filter); |
| 169 | 169 |
| 170 | 170 |
| 171 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom
ain, const CString& indent) const; | 171 bool IsElementHidden(const CString& tag, IHTMLElement* pEl, const CString& dom
ain, const CString& indent) const; |
| 172 | 172 |
| 173 | 173 |
| 174 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add
Debug=false) const; | 174 bool ShouldBlock(CString src, int contentType, const CString& domain, bool add
Debug=false) const; |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 | 177 |
| 178 #endif // _PLUGIN_FILTER_H_ | 178 #endif // _PLUGIN_FILTER_H_ |
| OLD | NEW |