fanglingsu / vimb

Vimb - the vim like browser is a webkit based web browser that behaves like the vimperator plugin for the firefox and usage paradigms from the great editor vim. The goal of vimb is to build a completely keyboard-driven, efficient and pleasurable browsing-experience.
https://fanglingsu.github.io/vimb/
GNU General Public License v3.0
1.34k stars 99 forks source link

wyebadblock not working #677

Closed zlice closed 6 months ago

zlice commented 3 years ago

Steps to reproduce

Version:         3.6.0
WebKit compile:  2.26.4
WebKit run:      2.32.1
GTK compile:     3.24.13
GTK run:         3.24.29
libsoup compile: 2.66.4
libsoup run:     2.72.0
Extension dir:   /usr/lib/vimb

Follow steps from https://github.com/jun7/wyebadblock

sudo ln -s /usr/lib/wyebrowser/adblock.so /usr/lib/vimb/
cp /tmp/easylist.txt ~/.config/wyebadblock/

Expected behaviour

Ads on common sites are blocked

Actual behaviour

Ads are not blocked by wyeb is loaded lsof | grep wye

Comments

Not sure if this is vimb or wyeb related. Got a "stale" report and figured I'd try vimb again. Youtube plays videos and multiple windows don't mystically crash. But adblock is not working. Pretty sure I set it up right.

fanglingsu commented 3 years ago

@zlice Your setup looks right to me too. Are you shure the easylist.txt contains the desired rules? In this case wyebab --css should print some css element hinding rules. It might be that the ads you se are not covered by the found rules.

zlice commented 3 years ago

Yes, it prints out and if I rename easylist it says it can't find it. Maybe where I downloaded it from was out of date? Date in easylist says 202107211829. I noticed their readme has a link that doesn't seem to work.

jjakob commented 3 years ago

It works for me, what did you use to test it?

$ vimb --bug-info
Version:         3.6.0-34-g652f411
WebKit compile:  2.33.2
WebKit run:      2.33.2
GTK compile:     3.24.29
GTK run:         3.24.29
libsoup compile: 2.72.0
libsoup run:     2.72.0
Extension dir:   /usr/lib/vimb
# ls -la /usr/lib/vimb/adblock.so
lrwxrwxrwx 1 root root 30 Nov  2  2020 /usr/lib/vimb/adblock.so -> /usr/lib/wyebrowser/adblock.so
$ ll ~/.config/wyebadblock/easylist.txt
-rw-r--r-- 1 jernej jernej 1360573 Jul 30 18:15 /home/jernej/.config/wyebadblock/easylist.txt
$ crontab -l
@daily wget -nv -O ~/.config/wyebadblock/easylist.txt https://easylist.to/easylist/easylist.txt
zlice commented 3 years ago

used git and still no luck

Version:         3.6.0-34-g652f411
WebKit compile:  2.32.3
WebKit run:      2.32.3
GTK compile:     3.24.29
GTK run:         3.24.29
libsoup compile: 2.72.0
libsoup run:     2.72.0
Extension dir:   /usr//lib/vimb
zlice commented 3 years ago

Can someone point to another plugin so I can test if it's plugins not working or adblock?

jjakob commented 3 years ago

Can you try https://d3ward.github.io/toolz/src/adblock.html ? I get a 57% score here with https://easylist.to/easylist/easylist.txt. Some ads are indeed not blocked. Maybe you'd need a more strict list for that.

zlice commented 3 years ago

35%, only fastclick twitter and youtube trackers. but youtube ads play

jjakob commented 3 years ago

I could get a 35% score identical to yours by disabling plugins :set plugins=false and reloading the test twice. Now I can't get that test back to 57% even after enabling plugins back and restarting vimb, but that's probably a different issue. You can check if they're enabled with :set plugins?

zlice commented 3 years ago

I did try changing to false then true while testing. But it was originally true when things weren't blocked.

set plugins=true

jjakob commented 3 years ago

Well, I still get 35% even after rebooting the machine. I'm not sure if this is due to wyebadblock now not working or the adblock test site not working. I'm pretty sure it's the former as canyoublockit.com also shows no ads blocked.

zlice commented 3 years ago

Does it work for you on other sites? youtube?

jjakob commented 3 years ago

No, it doesn't block youtube ads. But I think it completely broke after I disabled and enabled plugins. I'm hesitant to delete my caches as I don't want to lose my history. Maybe you can try :cleardata ? Or deleting ~/.cache/vimb ?

zlice commented 3 years ago

Tried to :cleardata and rm -rf ~/.cache/vimb with OS package and git latest. Still the same.

fanglingsu commented 3 years ago

@zlice I know it's not you intension, but you could give https://github.com/hectorm/hblock a try. This blocks urls with help of the /etc/hosts file so this blocking works for all browsers and leads to a score of 72% for me. But this is not as finegrained as wyebadblock.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity within the last 60 days.

zlice commented 6 months ago

I was able to get things working with 3.7.0 and webkit 2.41