| OLD | NEW |
| 1 libadblockplus | 1 libadblockplus |
| 2 ============== | 2 ============== |
| 3 | 3 |
| 4 A C++ library offering the core functionality of Adblock Plus. | 4 A C++ library offering the core functionality of Adblock Plus. |
| 5 | 5 |
| 6 Getting/updating the dependencies | 6 Getting/updating the dependencies |
| 7 --------------------------------- | 7 --------------------------------- |
| 8 | 8 |
| 9 libadblockplus has dependencies that aren't part of this repository. They are | 9 libadblockplus has dependencies that aren't part of this repository. They are |
| 10 retrieved and updated during the build process, but you can also manually update | 10 retrieved and updated during the build process, but you can also manually update |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 done via a second type of filter that is completely ignored when matching URLs: | 213 done via a second type of filter that is completely ignored when matching URLs: |
| 214 [element hiding rules](https://adblockplus.org/en/filters#elemhide). | 214 [element hiding rules](https://adblockplus.org/en/filters#elemhide). |
| 215 | 215 |
| 216 You can retrieve a list of all CSS selectors for elements that should be hidden | 216 You can retrieve a list of all CSS selectors for elements that should be hidden |
| 217 using | 217 using |
| 218 [`FilterEngine::GetElementHidingSelectors`](https://adblockplus.org/docs/libadbl
ockplus/class_adblock_plus_1_1_filter_engine.html#a91c44dac13c7655230be49440f45a
168). | 218 [`FilterEngine::GetElementHidingSelectors`](https://adblockplus.org/docs/libadbl
ockplus/class_adblock_plus_1_1_filter_engine.html#a91c44dac13c7655230be49440f45a
168). |
| 219 | 219 |
| 220 What libadblockplus clients typically do with this is to generate a CSS style | 220 What libadblockplus clients typically do with this is to generate a CSS style |
| 221 sheet that is injected into each page. | 221 sheet that is injected into each page. |
| 222 | 222 |
| 223 ### Disabling network requests from Adblock Plus on current connection |
| 224 At any moment you can call [`FilterEngine::SetAllowedConnectionType`](https://ad
blockplus.org/docs/libadblockplus/class_adblock_plus_1_1_filter_engine.html#a4be
e602fb50abcb945d3f19468fd8893) to change the settings indicating what connection
types are allowed in your application. However to have it working you should al
so pass a callback function into factory method of FilterEngine. This callback i
s being called before each request and the value of argument is earlier passed s
tring into `FilterEngine::SetAllowedConnectionType`, what allows to query the sy
stem and check whether the current connection is in accordance with earlier stor
ed value in settings. |
| 225 For example, you can pass "not_metered" into [`FilterEngine::SetAllowedConnectio
nType`](https://adblockplus.org/docs/libadblockplus/class_adblock_plus_1_1_filte
r_engine.html#a4bee602fb50abcb945d3f19468fd8893) and on each request you can che
ck whether the current connection is "not_metered" and return true or false from
you implementation of callback [`AdblockPlus::FilterEngine::CreateParameters::i
sConnectionAllowed`](https://adblockplus.org/docs/libadblockplus/structAdblockPl
us_1_1FilterEngine_1_1CreateParameters.html#a86f427300972d3f98bb6d4108301a526). |
| 226 |
| 223 Shell | 227 Shell |
| 224 ----- | 228 ----- |
| 225 | 229 |
| 226 The _shell_ subdirectory contains an example application using libadblockplus. | 230 The _shell_ subdirectory contains an example application using libadblockplus. |
| 227 | 231 |
| 228 It's a simple shell that loads subscriptions into memory and checks | 232 It's a simple shell that loads subscriptions into memory and checks |
| 229 whether a specified resource would be blocked or not. | 233 whether a specified resource would be blocked or not. |
| 230 | 234 |
| 231 To see the available commands, type `help`. | 235 To see the available commands, type `help`. |
| 232 | 236 |
| 233 ### Unix | 237 ### Unix |
| 234 | 238 |
| 235 The shell is automatically built by `make`, you can run it as follows: | 239 The shell is automatically built by `make`, you can run it as follows: |
| 236 | 240 |
| 237 build/out/abpshell | 241 build/out/abpshell |
| 238 | 242 |
| 239 ### Windows | 243 ### Windows |
| 240 | 244 |
| 241 Just run the project *abpshell*. | 245 Just run the project *abpshell*. |
| OLD | NEW |