Android Question How to make ad block with webview1 ?

Ajws

Member
Licensed User
Hi all,

do you know how to set adblock for website load with webview ?


Thanks
Regards
Ajws
 

nobbi59

Active Member
Licensed User
Longtime User
There are two ways of making an adblocker:

1. Way (Really dirty, most websites wont work like they did before) is to just disable JavaScript

2. Way will take you a bit of time but it will work very good.
First you get the source of the Webpage.
Then you use EasyList to remove all parts of the html source that contain ads.
 
Upvote 0

Ajws

Member
Licensed User
See webview documentation. Use the overrideurl event.
i do this...

Sub WebView1_OverrideUrl (Url As String) As Boolean
Log(Url)
End Sub


I can not get all the links that are called when accessing the website, if i can get link ads maybe i can block it ? any suggestion ?

Thanks
 
Upvote 0

Ajws

Member
Licensed User
There are two ways of making an adblocker:

1. Way (Really dirty, most websites wont work like they did before) is to just disable JavaScript

2. Way will take you a bit of time but it will work very good.
First you get the source of the Webpage.
Then you use EasyList to remove all parts of the html source that contain ads.

its all ads called with javascript ?
 
Upvote 0
Top