Update readme

This commit is contained in:
jun7 2018-05-23 12:51:04 +09:00
parent 881b2859ed
commit 5841dd4785

View File

@ -5,13 +5,14 @@ most of code of this are from https://github.com/GNOME/epiphany/tree/master/embe
wyebad is shared by clients, So even nowadays, browsers spawn procs for each windows,
wyebad keeps single server proc that makes less memory and less cpu times.
Don't worry, wyeb wills quit automatically when there is no client and 30 secs past.
For exsample, while epiphay's webproc uses 240M RAM for
[a page](http://simple-adblock.com/faq/testing-your-adblocker/), wyeb uses 160M for the same page.
Of course the adblock uses 80M but not gain.
### usage:
Don't worry, wyeb wills quit automatically when there is no client and 30 secs past.
## usage:
make
sudo make install
@ -24,26 +25,9 @@ wyebadblock only checks 'easylist.txt'
Testing element hiding is not supported though,
You can check if it works on http://simple-adblock.com/faq/testing-your-adblocker/
### Disabling
Setting chars(whatever) to the env value $DISABLE_ADBLOCK disables adblock.
For source code:
set string "adblock:false;" as the user data of the
webkit_web_context_set_web_extensions_initialization_user_data;
Runtime:
g_object_set_data(G_OBJECT(webkitwebpage), "adblock", GINT_TO_POINTER('n'));
in any extension.
---
## For webkit2gtk browsers
On Arch Linux
On Arch Linux. Make sure on other distros, the paths are may different.
### epiphany
@ -96,6 +80,39 @@ For wyeb, just copy the user.css to the conf dir.
Make sure the huge css takes mamory a lot.
## Disabling
Setting chars(whatever) to the env value $DISABLE_ADBLOCK disables adblock.
###For source code:
set string ";adblock:false;" as the user data of the
webkit_web_context_set_web_extensions_initialization_user_data;
Runtime:
g_object_set_data(G_OBJECT(webkitwebpage), "adblock", GINT_TO_POINTER('n'));
in any extension.
If you want full control of wyebab as wyeb does, wyebab has api mode.
Set string ";wyebabapi;" as the extensions_init's data.
In api mode wyebab doesn't block URIs but keeps alive server proc and
set the check function to the page object.
So you can call the check func at where ever as below.
bool (*checkf)(const char *, const char *) =
g_object_get_data(G_OBJECT(webkitwebpage), "wyebcheck");
if (checkf)
passed = checkf(requesturi, pageuri);
I don't keep APIs which no one use, so tell me if you are using it.
or
Use the shell interface below.
## Shell
wyebab