wyebadblock/README.md

63 lines
1.3 KiB
Markdown
Raw Normal View History

2017-07-17 08:10:19 +00:00
# wyebadblock
2018-01-01 13:52:12 +00:00
An adblock extension for [wyeb](https://github.com/jun7/wyeb), also webkit2gtk browsers.
2017-07-17 08:18:17 +00:00
most of code of this are from https://github.com/GNOME/epiphany/tree/master/embed/web-extension
### usage:
2018-01-19 02:11:17 +00:00
make
make install
2017-07-17 08:18:17 +00:00
then
2018-01-17 12:02:54 +00:00
copy **easylist.txt** to ~/.config/wyebadblock/
2017-07-17 08:18:17 +00:00
2018-01-11 06:57:12 +00:00
wyebadblock only checks 'easylist.txt'
2017-07-17 08:18:17 +00:00
2018-01-02 01:07:34 +00:00
2018-01-19 02:16:52 +00:00
You can check if it works on http://simple-adblock.com/faq/testing-your-adblocker/
Testing element hiding is not supported though.
2018-01-19 02:11:17 +00:00
2018-01-11 06:57:12 +00:00
### Disabling
2018-01-02 01:07:34 +00:00
Setting chars(whatever) to the env value $DISABLE_ADBLOCK disables adblock.
For source code:
2018-01-11 06:58:39 +00:00
set string ";adblock:false;" as the user data of the
2018-01-02 01:07:34 +00:00
webkit_web_context_set_web_extensions_initialization_user_data;
2018-01-01 13:56:19 +00:00
---
2018-01-01 13:52:12 +00:00
2018-01-19 02:16:52 +00:00
2018-01-11 06:57:12 +00:00
## For webkit2gtk browsers
2018-01-01 13:53:19 +00:00
On Arch Linux
### surf
sudo mkdir usr/local/lib/surf
sudo ln -s /lib/wyebrowser/adblock.so /usr/local/lib/surf
2018-01-01 13:52:12 +00:00
### vimb
sudo ln -s /lib/wyebrowser/adblock.so /lib/vimb
2018-01-19 02:11:17 +00:00
2018-01-03 04:06:29 +00:00
There is a PKGBUILD file. see PKGBULDs dir.
2018-01-01 13:52:12 +00:00
### lariza
mkdir -p ~/.config/lariza/web_extensions
ln -s /lib/wyebrowser/adblock.so ~/.config/lariza/web_extensions
2018-01-03 04:06:29 +00:00
2018-01-19 02:11:17 +00:00
2018-01-19 02:16:52 +00:00
---
2018-01-19 02:11:17 +00:00
## Element Hiding
2018-01-19 02:16:52 +00:00
Per domain CSS hider rule is not supported and this may crash webkit2gtk.
2018-01-19 02:11:17 +00:00
make cssoutput
./cssoutput > user.css
And add the user.css to your browser as user css.
On wyeb, just copy the user.css to the conf dir.